Lifebuoy updated, now dies after 4 hits
This commit is contained in:
@@ -297,7 +297,9 @@ bool dd::Systems::BallSystem::Contact(const Events::Contact &event)
|
||||
} // Lifebuoy should always reflect the ball upwards
|
||||
else if (m_World->GetProperty<std::string>(otherEntitiy, "Name") == "Lifebuoy"){
|
||||
ballTransform->Velocity = glm::vec3(ballTransform->Velocity.x, abs(ballTransform->Velocity.y), ballTransform->Velocity.z);
|
||||
|
||||
Events::LifebuoyHit e;
|
||||
e.Lifebuoy = otherEntitiy;
|
||||
EventBroker->Publish(e);
|
||||
} else {
|
||||
auto it = m_Contacts.find(ballEntity);
|
||||
if (it == m_Contacts.end()) {
|
||||
|
||||
Reference in New Issue
Block a user