]> git.lizzy.rs Git - SuperMouseAdventure.git/commitdiff
Level-Auswahl v0.4
authorKG0104 <76601263+KG0104@users.noreply.github.com>
Wed, 25 Aug 2021 10:12:43 +0000 (12:12 +0200)
committerKG0104 <76601263+KG0104@users.noreply.github.com>
Wed, 25 Aug 2021 10:12:43 +0000 (12:12 +0200)
2DGame/Assets/Scenes/level_selection.unity
2DGame/Assets/Scripts/LevelSelection.cs

index 9e4cf2664f7844e07451aca7efe5aff57c13f90e..fcd5ff3c6073226c4f7ec489ef3ededf81f73edd 100644 (file)
@@ -229,6 +229,28 @@ MonoBehaviour:
   - {fileID: 1184606116}
   - {fileID: 1159626128}
   - {fileID: 275711221}
+  nameOfLevel: {fileID: 526356690}
+  levelNames:
+  - Level 1
+  - Level 2
+  - Level 3
+  - Level 4
+  - Level 5
+  - Level 6
+  - Level 7
+  - Level 8
+  - Level 9
+  - Level 10
+  nameOfWorld: {fileID: 2094208785}
+  worldNames:
+  - Green Idyll
+  - 
+  - 
+  - 
+  - 
+  - 
+  - 
+  - 
 --- !u!1 &275711220
 GameObject:
   m_ObjectHideFlags: 0
index 4949829c2d6ee2f0c73d4c373f40493b830410e0..534fd36e9864568792d12d570e76df91fba632bd 100644 (file)
@@ -2,13 +2,24 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.SceneManagement;
+using UnityEngine.UI;
 
 public class LevelSelection : MonoBehaviour
 {
     [SerializeField]
     Transform[] levels;
 
-    int[] scenes;
+    [SerializeField]
+    Text nameOfLevel;
+
+    [SerializeField]
+    string[] levelNames;
+
+    [SerializeField]
+    Text nameOfWorld;
+
+    [SerializeField]
+    string[] worldNames;
 
     private int level;
 
@@ -43,5 +54,6 @@ public class LevelSelection : MonoBehaviour
         }
 
         transform.position = levels[level].transform.position;
+        nameOfLevel.text = levelNames[level];
     }
 }