Reset ball is also octopus.
This commit is contained in:
@@ -75,7 +75,7 @@ set(SOURCE_FILES
|
|||||||
${SOURCE_FILES_Rendering}
|
${SOURCE_FILES_Rendering}
|
||||||
${SOURCE_FILES_Transform}
|
${SOURCE_FILES_Transform}
|
||||||
${SOURCE_FILES_Physics}
|
${SOURCE_FILES_Physics}
|
||||||
${SOURCE_FILES_Game} ../../include/Game/CLife.h ../../include/Game/ELifeLost.h ../../include/Game/EResetBall.h ../../include/Game/EScoreEvent.h)
|
${SOURCE_FILES_Game})
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||||
|
|||||||
@@ -41,15 +41,27 @@ void dd::Systems::PadSystem::UpdateEntity(double dt, EntityID entity, EntityID p
|
|||||||
transformEntity->Position = glm::vec3(20, 20, -10);
|
transformEntity->Position = glm::vec3(20, 20, -10);
|
||||||
|
|
||||||
//Temporary. Create new ball.
|
//Temporary. Create new ball.
|
||||||
auto ent = m_World->CreateEntity();
|
/*auto ent = m_World->CreateEntity();
|
||||||
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
||||||
transform->Position = glm::vec3(0.5f, 0.f, -10.f);;
|
transform->Position = glm::vec3(0.5f, 0.f, -10.f);
|
||||||
transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
||||||
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
||||||
sprite->SpriteFile = "Textures/Ball.png";
|
sprite->SpriteFile = "Textures/Ball.png";
|
||||||
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
||||||
std::shared_ptr<Components::Ball> cball = m_World->AddComponent<Components::Ball>(ent);
|
std::shared_ptr<Components::Ball> cball = m_World->AddComponent<Components::Ball>(ent);
|
||||||
std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
||||||
|
physics->Static = false;*/
|
||||||
|
|
||||||
|
auto ent = m_World->CreateEntity();
|
||||||
|
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
||||||
|
transform->Position = glm::vec3(0.5f, 0.f, -10.f);
|
||||||
|
transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
||||||
|
auto model = m_World->AddComponent<Components::Model>(ent);
|
||||||
|
model->ModelFile = "Models/Test/Ball/Ballopus.obj";
|
||||||
|
//auto pointlight = m_World->AddComponent<Components::PointLight>(ent);
|
||||||
|
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
||||||
|
std::shared_ptr<Components::Ball> cball = m_World->AddComponent<Components::Ball>(ent);
|
||||||
|
std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
||||||
physics->Static = false;
|
physics->Static = false;
|
||||||
|
|
||||||
m_World->RemoveEntity(entity);
|
m_World->RemoveEntity(entity);
|
||||||
|
|||||||
Reference in New Issue
Block a user