Fixed Kraken battle. I think. Made it so you do not shoot projectiles or squids when struggling with Kraken.

This commit is contained in:
PlatinumSkink
2015-10-21 15:12:50 +02:00
parent 2954e2cbb3
commit f0b36c6f12
10 changed files with 126 additions and 29 deletions
+7
View File
@@ -95,6 +95,7 @@ void dd::Systems::KrakenSystem::UpdateEntity(double dt, EntityID entity, EntityI
}
break;
case 2: // Grabbing
m_NumberOfActions++;
kraken->CurrentAction = 5;
krakenAttack.ChargeUpdate = 0;
krakenAttack.KrakenStrength = 0.1;
@@ -103,6 +104,7 @@ void dd::Systems::KrakenSystem::UpdateEntity(double dt, EntityID entity, EntityI
break;
case 3: // Brick Generating
{
m_NumberOfActions++;
kraken->CurrentAction = 1;
Events::BrickGenerating e;
e.Origin1 = glm::vec3(-5, 7, -10);
@@ -187,6 +189,11 @@ bool dd::Systems::KrakenSystem::OnContact(const dd::Events::Contact &event)
auto ball = m_World->GetComponent<Components::Ball>(otherEntitiy);
if (ball != nullptr) {
ball->Combo += 1;
Events::ComboEvent ec;
ec.Combo = ball->Combo;
ec.Ball = otherEntitiy;
EventBroker->Publish(ec);
Events::KrakenHit e;
e.Kraken = krakenEntity;
e.Hitter = otherEntitiy;