Example #1
0
    public void Restart()
    {
        List <System.Action> yesFunctions = new List <System.Action>();

        yesFunctions.Add(LevelManager.instance.RestartFromBeginning);
        yesFunctions.Add(Pausing);

        ConfirmationScreen temp = Instantiate(confirmationRef);

        temp.Init("Are you sure you want to Restart?", yesFunctions);
    }
Example #2
0
    public void ClearData()
    {
        List <System.Action> yesFunctions = new List <System.Action>();

        yesFunctions.Add(LevelManager.instance.ClearSavedData);
        PlayerPrefs.DeleteAll();

        ConfirmationScreen temp = Instantiate(confirmationRef);

        temp.Init("Are you sure you want to clear all Data?", yesFunctions);
    }
Example #3
0
 public void Confirm(Action action, string actionName)
 {
     ShowModal(confirmationScreen);
     confirmationScreen.Init(
         actionName: actionName,
         yes: () => {
         HideModal();
         action();
     },
         no: () => {
         HideModal();
     }
         );
 }
Example #4
0
    public void Home()
    {
        List <System.Action> yesFunctions = new List <System.Action>();

        yesFunctions.Add(delegate() { SceneTransition.instance.LoadSceneInBG("LevelSelection"); });
        yesFunctions.Add(delegate() { LevelManager.instance.ResetLevelVariables(); });
        yesFunctions.Add(delegate() { EventManager.instance.TriggerUpdateHUDEvent(false); });
        yesFunctions.Add(delegate() { AudioManager.StopAllBGM(); });
        yesFunctions.Add(delegate() { AudioManager.PlayBGM("Level", true); });
        yesFunctions.Add(Pausing);

        ConfirmationScreen temp = Instantiate(confirmationRef);

        temp.Init("Are you sure you want to go Home?", yesFunctions);
    }