Ejemplo n.º 1
0
 void VerifTiming(bool firstTime, PlayerBehaviour player)
 {
     LevelManager.instance.addScore(LevelManager.instance.scoreStay);
     if (!done && firstTime)
     {
         player.AnimationScore("perfect");
         LevelManager.instance.addScore(LevelManager.instance.scorePerfect);
         done = true;
         time = 0;
     }
     else if (time < LevelManager.instance.timingGood && !done)
     {
         player.AnimationScore("good");
         LevelManager.instance.addScore(LevelManager.instance.scoreGood);
         done = true;
         time = 0;
     }
 }
Ejemplo n.º 2
0
 void VerifColorPlayer(BackGroundColorState color, PlayerBehaviour player, bool firstTime)
 {
     if (ColorStates == color)
     {
         VerifTiming(firstTime, player);
     }
     else
     {
         if (GameManager.GameStates == GameManager.GameState.InGame)
         {
             time += Time.deltaTime;
             if (time > LevelManager.instance.timingGood)
             {
                 time = 0;
                 --player.life;
                 player.AnimationScore("miss");
                 LevelManager.instance.addScore(LevelManager.instance.scoreMiss);
             }
         }
     }
 }