Esempio n. 1
0
 public void RetryLevelButton()
 {
     if (SceneManager.GetActiveScene().name == "Multiplayer")
     {
         SceneManager.LoadScene("Multiplayer");
     }
     else
     {
         ChapterSelectManager.EnterSelectedChapterP();
     }
 }
Esempio n. 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        serializedObject.Update();

        EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);

        EditorGUILayout.PrefixLabel("Chapter Selection Preview Editor");

        EditorGUILayout.PropertyField(chapterNumber, new GUIContent("Chapter Number"));
        EditorGUILayout.PropertyField(chapterObject, new GUIContent("Chapter Object"));

        ChapterSelectManager s = (ChapterSelectManager)target;

        if (GUILayout.Button("Add Chapter"))
        {
            s.EditorAddChapter();
        }

        if (GUILayout.Button("Delete Chapter"))
        {
            s.EditorDeleteChapter();
        }

        if (GUILayout.Button("Sort"))
        {
            s.SortChapters();
        }
        EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);

        serializedObject.ApplyModifiedProperties();

        foreach (ChapterPreview l in s.chapterPreviews)
        {
            EditorGUILayout.PrefixLabel("Chapter: " + l.chapter.ToString());
            EditorGUILayout.ObjectField("Chapter Object:", l.chapterObject, typeof(GameObject), true);
            EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
        }
    }