예제 #1
0
 internal void GoalReached(GenericSensor sensor)
 {
     // Ask sensor for animation and play it
     currentPlayer_.enabled = false;
     Play(sensor.HitAnimation);
     if (currentGoal_ == SensorKind.ObjetivoFinal)
     {
         SetState(GameState.Ending);
     }
     else
     {
         ConsumeGoal();
         SetState(GameState.LevelResult);
     }
 }
예제 #2
0
 internal void EnemyHit(GenericSensor sensor)
 {
     // Ask sensor for animation and play it
     Play(sensor.HitAnimation);
     SetState(GameState.LevelResult);
 }