Ejemplo n.º 1
0
 public void GetHit()
 {
     if (!CoderLevelEnder.LevelEnded)
     {
         if (!CoderCountdown.IsRunning)
         {
             CoderCountdown.StartStopWatch();
         }
         CoderKeyboard.InterpretKeyPress(this);
     }
 }
Ejemplo n.º 2
0
    public static void EndLevel()
    {
        if (!LevelEnded)
        {
            instance.levelEnded = true;
            CoderCountdown.StopStopWatch();
            CoderKeyboard.DeactivateAllKeys();
            CoderStatusText.DisplayResults(CoderScoreboard.GetLevel());

            CoderMusicPlayer.StopMusic();

            if (CoderScoreboard.GetLevel() == "fail")
            {
                instance.audio.PlayOneShot(instance.loseSound);
            }
            else
            {
                instance.audio.PlayOneShot(instance.winSound);
            }

            instance.exitButton.SetActive(true);
        }
    }
Ejemplo n.º 3
0
 void Awake()
 {
     instance      = this;
     LastActiveKey = null;
 }