private void Start()
    {
        // Set Player Global Progression

        Global_Variable.Last_Level_Build_Index = SceneManager.GetActiveScene().buildIndex;
        Save_System.Save_Data(SceneManager.GetActiveScene().buildIndex);
        Event_System.current.onReloadLevel += Reload_Level;
    }
Beispiel #2
0
    private IEnumerator Main_Menu_Sequence()
    {
        // Wait for the middle of the animation then set last build index to 0 to disable continue option in main menu (^_^)
        yield return(new WaitForSeconds(Delay_Before_Main_Menu / 2));

        Save_System.Save_Data(0);
        // Wait for the end of the animation then make a transition to main menu;
        yield return(new WaitForSeconds(Delay_Before_Main_Menu / 2));

        Level_Transition_Ma.Load_A_Level(0);
    }
Beispiel #3
0
 private void Awake()
 {
     if (manageData == null)
     {
         DontDestroyOnLoad(gameObject);
         manageData = this;
     }
     else if (manageData != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #4
0
 public void Wipe_Button()
 {
     Save_System.Wipe_Data();
     BTN_Continue.SetActive(false);
 }
Beispiel #5
0
 private void Awake()
 {
     Save_System.Recover_Data();
 }