Merged into master and uncommented ball
This commit is contained in:
Regular → Executable
+24
-26
@@ -98,34 +98,32 @@ public:
|
|||||||
|
|
||||||
//TODO: Remove tobias light-test code.
|
//TODO: Remove tobias light-test code.
|
||||||
|
|
||||||
|
{
|
||||||
|
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, -9.9f);
|
||||||
|
transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
||||||
|
|
||||||
|
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
||||||
|
sprite->SpriteFile = "Textures/Ball.png";
|
||||||
|
|
||||||
// {
|
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
||||||
// auto ent = m_World->CreateEntity();
|
std::shared_ptr<Components::Ball> ball = m_World->AddComponent<Components::Ball>(ent);
|
||||||
// std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
|
||||||
// transform->Position = glm::vec3(0.5f, 0.f, -9.9f);
|
std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
||||||
// transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
physics->Static = false;
|
||||||
//
|
|
||||||
// std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
auto plight = m_World->AddComponent<Components::PointLight>(ent);
|
||||||
// sprite->SpriteFile = "Textures/Ball.png";
|
plight->Radius = 2.f;
|
||||||
//
|
|
||||||
// std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
m_World->CommitEntity(ent);
|
||||||
// std::shared_ptr<Components::Ball> ball = m_World->AddComponent<Components::Ball>(ent);
|
|
||||||
//
|
Events::SetImpulse e;
|
||||||
// std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
e.Entity = ent;
|
||||||
// physics->Static = false;
|
e.Impulse = glm::vec2(0.f, -7.f);
|
||||||
//
|
e.Point = glm::vec2(0.5f, 0.f);
|
||||||
// auto plight = m_World->AddComponent<Components::PointLight>(ent);
|
m_EventBroker->Publish(e);
|
||||||
// plight->Radius = 2.f;
|
}
|
||||||
//
|
|
||||||
// m_World->CommitEntity(ent);
|
|
||||||
//
|
|
||||||
// Events::SetImpulse e;
|
|
||||||
// e.Entity = ent;
|
|
||||||
// e.Impulse = glm::vec2(0.f, -7.f);
|
|
||||||
// e.Point = glm::vec2(0.5f, 0.f);
|
|
||||||
// m_EventBroker->Publish(e);
|
|
||||||
// }
|
|
||||||
|
|
||||||
{
|
{
|
||||||
auto t_BrickWall = m_World->CreateEntity();
|
auto t_BrickWall = m_World->CreateEntity();
|
||||||
|
|||||||
Reference in New Issue
Block a user