Exemple #1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            cm       = new ControllerManager();
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        players = GameObject.FindObjectsOfType <PlayerControl>();
    }
Exemple #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         cm       = new ControllerManager();
         DontDestroyOnLoad(this.gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     if (Assets.Scripts.Data.RoundHandler.Instance == null)
     {
         players = GameObject.FindObjectsOfType <PlayerControl>();
     }
     else
     {
         players = Assets.Scripts.Data.RoundHandler.Instance.PlayerControl();
     }
 }