CTravels replaces Sticky = true. Put "Travels" component on anything that should be moved down during travel sequences.
This commit is contained in:
@@ -31,15 +31,13 @@ void dd::Systems::TravellingSystem::Update(double dt)
|
||||
void dd::Systems::TravellingSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
|
||||
{
|
||||
if (m_Travelling) {
|
||||
auto transform = m_World->GetComponent<Components::Transform>(entity);
|
||||
if (transform != nullptr) {
|
||||
if (!transform->Sticky) {
|
||||
auto travels = m_World->GetComponent<Components::Travels>(entity);
|
||||
if (travels != nullptr) {
|
||||
auto transform = m_World->GetComponent<Components::Transform>(entity);
|
||||
if (transform != nullptr) {
|
||||
transform->Position.y -= 6.0f * dt;
|
||||
}
|
||||
}
|
||||
else {
|
||||
transform->Position.y -= 6.0f * dt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user