Oh, and lives now swim around in a sinus wave. All bricks break when Kraken is defeated.
This commit is contained in:
@@ -282,7 +282,7 @@ bool dd::Systems::KrakenSystem::OnKrakenHit(const dd::Events::KrakenHit &event)
|
|||||||
|
|
||||||
auto model = m_World->GetComponent<Components::Model>(event.Kraken);
|
auto model = m_World->GetComponent<Components::Model>(event.Kraken);
|
||||||
float modifier = ((float)kraken->MaxHealth - (float)kraken->Health) / (float)kraken->MaxHealth; // 1 is almost no life left, 0 is max life left.
|
float modifier = ((float)kraken->MaxHealth - (float)kraken->Health) / (float)kraken->MaxHealth; // 1 is almost no life left, 0 is max life left.
|
||||||
std::cout << modifier << std::endl;
|
//std::cout << modifier << std::endl;
|
||||||
model->Color = glm::vec4(1, 1 - modifier, 1 - modifier, 1);
|
model->Color = glm::vec4(1, 1 - modifier, 1 - modifier, 1);
|
||||||
|
|
||||||
int timeDifferenceBetweenMaxAndMin = m_KrakenMaxSecondsToAction - m_KrakenMinSecondsToAction;
|
int timeDifferenceBetweenMaxAndMin = m_KrakenMaxSecondsToAction - m_KrakenMinSecondsToAction;
|
||||||
|
|||||||
@@ -1137,7 +1137,7 @@ bool dd::Systems::LevelSystem::OnKrakenDefeated(const dd::Events::KrakenDefeated
|
|||||||
e.Score = 1000;
|
e.Score = 1000;
|
||||||
EventBroker->Publish(e);
|
EventBroker->Publish(e);
|
||||||
|
|
||||||
std::cout << m_LooseBricks << std::endl;
|
//std::cout << m_LooseBricks << std::endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user