Added ScoreEvent, added score to bricks. Stage resets after all bricks are destroyed.

This commit is contained in:
PlatinumSkink
2015-09-15 17:25:47 +02:00
parent b340cf97bb
commit c2d29b6110
14 changed files with 132 additions and 43 deletions
+10
View File
@@ -52,6 +52,11 @@ void dd::Systems::PhysicsSystem::Update(double dt)
if (! transformComponent)
continue;
if (body == nullptr) {
//LOG_ERROR("This body should not exist");
continue;
}
if (m_World->GetEntityParent(entity) == 0) {
b2Vec2 position;
@@ -86,6 +91,11 @@ void dd::Systems::PhysicsSystem::Update(double dt)
EntityID entity = i.first;
b2Body* body = i.second;
if (body == nullptr) {
//LOG_ERROR("This body should not exist");
continue;
}
auto transformComponent = m_World->GetComponent<Components::Transform>(entity);
if (! transformComponent)
continue;