Exemplo n.º 1
0
        // 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>();
    
 }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
 void Awake()
 {
     if(_instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         _instance = this;
     }
     else if(_instance != this)
     {
         Destroy(this.gameObject);
     }
     //			BeginGame();
     _state = GameState.Running;
 }