Added ScoreEvent, added score to bricks. Stage resets after all bricks are destroyed.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user