Sticky works except graphics. Temporarily colored odd bricks.

This commit is contained in:
PlatinumSkink
2015-10-08 15:42:13 +02:00
parent 566b440d80
commit 6669d91a90
8 changed files with 97 additions and 12 deletions
+10
View File
@@ -57,6 +57,16 @@ void dd::Systems::PadSystem::UpdateEntity(double dt, EntityID entity, EntityID p
{
auto templateCheck = m_World->GetComponent<Components::Template>(entity);
if (templateCheck != nullptr){ return; }
auto ball = m_World->GetComponent<Components::Ball>(entity);
if (ball != nullptr) {
if (ball->Sticky) {
auto transform = m_World->GetComponent<Components::Transform>(entity);
transform->Position = Transform()->Position;
transform->Position -= ball->StickyPlacement;
transform->Orientation = glm::quat();
}
}
}
void dd::Systems::PadSystem::Update(double dt)