// Sets up singleton instance. Will remain if one does not already exist in scene
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            else if (instance != this)
            {
                Destroy(gameObject);
            }

            controllers = new List<Controller>();
			spawnPoints = new List<GameObject>();
        }
 // Sets up singleton instance. Will remain if one does not already exist in scene
 void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     controllers = new List<Controller>();
     characterToPlayer = new Dictionary<Enums.Characters, PlayerID>();
    
 }
Beispiel #3
0
        // Sets up singleton instance. Will remain if one does not already exist in scene
        void Awake()
        {
            if (instance == null)
            {
                DontDestroyOnLoad(gameObject);
                instance = this;
            }
            else if (instance != this)
            {
                Destroy(gameObject);
            }

            controllers = new List<Controller>();
            customColor = new CustomColor();
        }
 void Awake()
 {
     if(_instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         _instance = this;
     }
     else if(_instance != this)
     {
         Destroy(this.gameObject);
     }
     //			BeginGame();
     _state = GameState.Running;
 }