Ejemplo n.º 1
0
 public void ConsumeEvent(IEvent e)
 {
     if (e.GetType() == typeof(PlayerVictoryEvent))
     {
         MatchFinish(true);
     }
     else if (e.GetType() == typeof(PlayerDefeatEvent))
     {
         MatchFinish(false);
     }
     else if (e.GetType() == typeof(EnemyStartingDataEvent))
     {
         phase = 1;
         EnemyStartingDataEvent enemyDataEvent = e as EnemyStartingDataEvent;
         if (enemyText != null)
         {
             enemyText.text = enemyDataEvent.name;
         }
     }
     else if (e.GetType() == typeof(PhaseTransitionEvent))
     {
         PhaseTransitionEvent phaseTransitionEvent = e as PhaseTransitionEvent;
         phase = phaseTransitionEvent.nextPhase;
     }
 }
 public void ConsumeEvent(IEvent e)
 {
     if (e.GetType() == typeof(PhaseTransitionEvent))
     {
         PhaseTransitionEvent phaseTransitionEvent = e as PhaseTransitionEvent;
         TransitionPhase(phaseTransitionEvent.nextPhase);
     }
     else if (e.GetType() == typeof(EnemyStartingDataEvent))
     {
         AudioManager.GetInstance().StartMusic(Soundtrack.FinalBossTheme);
         AudioManager.GetInstance().StopMusic(Soundtrack.TitleTheme);
         DelayStart();
     }
     else if (e.GetType() == typeof(PlayerVictoryEvent))
     {
         KO();
     }
 }
Ejemplo n.º 3
0
 public void ConsumeEvent(IEvent e)
 {
     if (e.GetType() == typeof(EnemyStartingDataEvent))
     {
         EnemyStartingDataEvent startingDataEvent = e as EnemyStartingDataEvent;
         if (startingDataEvent.level < 0)
         {
             startingDataEvent.level = 0;
         }
         SetStats(1, startingDataEvent.level, startingDataEvent.maxPhase);
         this.level    = startingDataEvent.level;
         this.maxPhase = startingDataEvent.maxPhase;
     }
     else if (e.GetType() == typeof(PhaseTransitionEvent))
     {
         PhaseTransitionEvent phaseTransitionEvent = e as PhaseTransitionEvent;
         SetStats(phaseTransitionEvent.nextPhase, level, maxPhase);
     }
 }
Ejemplo n.º 4
0
 public void ConsumeEvent(IEvent e)
 {
     if (e.GetType() == typeof(PhaseTransitionEvent))
     {
         PhaseTransitionEvent phaseTransitionEvent = e as PhaseTransitionEvent;
         TransitionPhase(phaseTransitionEvent.nextPhase);
     }
     else if (e.GetType() == typeof(EnemyStartingDataEvent))
     {
         StartDelayed();
         AudioManager.GetInstance().StartMusic(Soundtrack.PsychicTheme);
         AudioManager.GetInstance().StopMusic(Soundtrack.TitleTheme);
     }
     else if (e.GetType() == typeof(PlayerVictoryEvent))
     {
         KO();
     }
     else if (e.GetType() == typeof(PlayerDefeatEvent))
     {
         FightOver();
     }
 }