void Awake() { if (instance == null) { instance = this; } }
// Checks to see if the value is already in the dictionary with TryGetValue // Then Adds it if it is not. public void setPowerUp(GameControllerSingleton.PowerUp check) { if (!hasPowerUp.Contains(check.alias)) { hasPowerUp.Add(check.alias); } }
void Awake() { hasPowerUp = new Dictionary <string, bool>(); rb = GetComponent <Rigidbody>(); gc = GameControllerSingleton.get(); myInv = GetComponent <Inventory>(); }
void Awake() { hasPowerUp = new Dictionary<string, bool>(); rb = GetComponent<Rigidbody>(); gc = GameControllerSingleton.get(); myInv = GetComponent<Inventory>(); }
// Checks to see if the value is already in the dictionary with TryGetValue // Then Adds it if it is not. public void setPowerUp(GameControllerSingleton.PowerUp check) { bool val; if (!hasPowerUp.TryGetValue(check.alias, out val)) { hasPowerUp.Add(check.alias, true); } }
public static GameControllerSingleton get() { if (Instance == null) { Instance = ScriptableObject.CreateInstance<GameControllerSingleton>(); Instance.Start(); } return Instance; }
public static GameControllerSingleton get() { if (Instance == null) { Instance = ScriptableObject.CreateInstance <GameControllerSingleton>(); Instance.Start(); } return(Instance); }
void Awake() { gc = GameControllerSingleton.get(); pc = GetComponent <PlayerController>(); myContents = new contents(); }
// Use this for initialization void Start() { gc = GameControllerSingleton.get(); gc.loadPowerUps(powerUpText); }
GameControllerSingleton gc; //GameController #endregion Fields #region Methods // Use this for initialization void Start() { gc = GameControllerSingleton.get(); gc.loadPowerUps(powerUpText); }
void Awake() { hasPowerUp = new List<string>(); gc = GameControllerSingleton.get(); myInv = GetComponent<Inventory>(); }
void Awake() { gc = GameControllerSingleton.get(); pc = GetComponent<PlayerController>(); myContents = new contents(); }