diff options
Diffstat (limited to 'Assets/Scripts/LevelController.cs')
-rw-r--r-- | Assets/Scripts/LevelController.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Assets/Scripts/LevelController.cs b/Assets/Scripts/LevelController.cs new file mode 100644 index 0000000..6d91d71 --- /dev/null +++ b/Assets/Scripts/LevelController.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LevelController : MonoBehaviour +{ + [SerializeField] GameObject treasure; + // Start is called before the first frame update + + public void ResetLevel() + { + Destroy(GameObject.Find("Boulder(Clone)")); + Destroy(GameObject.Find("BoobyTrapSpawnPoint(Clone)")); + Destroy(GameObject.Find("Treasure")); + Instantiate(treasure); + } +} |