Example #1
0
 /// <summary>
 /// Startet den timer mit callback
 /// </summary>
 public bool StartTimer(StartCounter.OnTimerFinished callback, GameManager.Games game)
 {
     if (timer == null)
     {
         return(false);
     }
     timer.StartGame(callback, game);
     return(true);
 }
    void ShowInstructions(GameManager.Games game)
    {
        instructions.SetActive(true);
        TextMeshProUGUI descText = instDescription.GetComponent <TextMeshProUGUI>();

        descText.text = descriptionList[(int)game];
        instructionImageRenderer.sprite = sprites[(int)game - 1];
        showInstructions = true;
        GameManager.pauseMenu.pausable = false;
    }
    public void StartGame(OnTimerFinished callback, GameManager.Games game)
    {
        timerFinishedCallback = callback;

        timeLeft = initialTime;

        countdownActive  = false;
        timerActive      = false;
        showInstructions = false;

        Time.timeScale = 0.0f;

        //show game instructions
        ShowInstructions(game);

        //
    }