Пример #1
0
 public void ResumeGame() //To leverage this funciton the pause screen gameobject must implement the pause script!
 {
     Time.timeScale     = 1;
     menuDelegateAction = gameObject.GetComponent <PauseMenu>().GameMaster.GetComponent <GameStateManager>().UnPauseGame;
     gameObject.GetComponent <PauseMenu>().GameMaster.GetComponent <GameStateManager>().isPaused = false;
     ExecuteAfterTime(milliSecondDelay, menuDelegateAction);
 }
Пример #2
0
    //Delays void action to allow menu sound to play before execution
    async void ExecuteAfterTime(int milliSeconds, MenuDelegateAction e)
    {
        await Task.Delay(milliSeconds);

        e.Invoke();
    }
Пример #3
0
 public void QuitGame() //Will after build quit the game
 {
     menuDelegateAction = Application.Quit;
     ExecuteAfterTime(milliSecondDelay, menuDelegateAction);
 }