Esempio n. 1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.Joystick1Button8) || Input.GetKeyDown(KeyCode.KeypadEnter))
     {
         levelTransition.FadeToNextLevel();
     }
 }
Esempio n. 2
0
 public void PlayerTwoSet()
 {
     teamTwoColor = SetTeamColor(teamTwoColor);
     GameData.SetTeamNames(TeamOneInput.text, TeamTwoInput.text);
     GameData.SetTeamColors(teamOneColor, teamTwoColor);
     LevelTransition.FadeToNextLevel();
 }
Esempio n. 3
0
 private void TutorialMode()
 {
     // Hyper Jump Countdown
     time          -= Time.deltaTime;
     timerText.text = $"Time to Hyper Jump: {time.ToString("n3")}";
     if (time <= 1)
     {
         levelTransition.FadeToNextLevel();
     }
 }
Esempio n. 4
0
    public void OnPostGoal()
    {
        goalScored = false;
        if (endGame)
        {
            LevelTransition.FadeToNextLevel();
        }

        if (teamOneScore >= scoreToWin)
        {
            OnWin(GameData.TeamOneName);
        }
        else if (teamTwoScore >= scoreToWin)
        {
            OnWin(GameData.TeamTwoName);
        }
        else
        {
            Confetti.Stop();
            Scoreboard.HideMessage();
            ResetAllPiecesToStart();
            Time.timeScale = 1f;
        }
    }