Esempio n. 1
0
    private void LevelButtonClicked(LoadingChapterInfo loadingChapterInfo, LevelScreenshot screenshot)
    {
        int currentSave = GameManager.Instance.CurrentSave;

        if (GameManager.Instance.Saves[currentSave].NbPlayer == 1)
        {
            GameManager.Instance.LoadChapter("ChapterSolo_0" + GameManager.Instance.CurrentChapter, loadingChapterInfo);
        }
        else
        {
            GameManager.Instance.LoadChapter("ChapterDuo_0" + GameManager.Instance.CurrentChapter, loadingChapterInfo);
        }
        //animation
        StartCoroutine(screenshot.PressedAnimation());
        //disable les controles pour ne pas pouvoir continuer alors qu'un bouton a déjà été pressed
        pressed = true;
        EventSystem.current.SetSelectedGameObject(null);
    }
Esempio n. 2
0
 /// <summary>
 /// Set the LoadingChapterInfos before loading the scene
 /// </summary>
 /// <param name="sceneName"></param>
 /// <param name="loadingInfo"></param>
 public void LoadChapter(string sceneName, LoadingChapterInfo loadingInfo)
 {
     loadingChapterInfos = loadingInfo;
     StartCoroutine(LoadAsyncScene(sceneName));
 }