Пример #1
0
 private void OnDestroy()
 {
     if (s_instance == this)
     {
         s_instance = null;
     }
 }
Пример #2
0
    public void destroyAndRespawnFromBottom()
    {
        DoorsControl doors = GameObject.FindGameObjectWithTag("Doors").GetComponent <DoorsControl>();

        doors.newEnemyFromBottom();
        Destroy(gameObject);
    }
Пример #3
0
 private void Awake()
 {
     if (s_instance != null)
     {
         Debug.LogError("DoorsControl already exists.");
     }
     s_instance = this;
 }