private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(instance);
     }
     else
     {
         Destroy(gameObject);
     }
 }
示例#2
0
 private void Start()
 {
     rl = GameObject.FindGameObjectWithTag("RL").GetComponent <RespawnLocator>();
 }