aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Scripts/LevelController.cs
blob: 6d91d719a40a0350d5d6d7d181639bd0789f456e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
    }
}