// Use this for initialization void Start() { waterCapacityLeft = waterCapacity; oreCapacityLeft = oreCapacity; if (playerResources == null) { playerResources = GameObject.FindGameObjectWithTag("Capital").GetComponent <Player_ResourceManager>(); } if (playerResources != null) { Debug.Log("STORAGE: Added to list of storage!"); playerResources.storageBuildings.Add(this); } if (playerUI == null) { playerUI = GameObject.FindGameObjectWithTag("Capital").GetComponent <Player_UIHandler>(); } }
// Use this for initialization void Start() { waterCapacityLeft = waterCapacity; oreCapacityLeft = oreCapacity; if (playerResources == null) { playerResources = GameObject.FindGameObjectWithTag("Capital").GetComponent<Player_ResourceManager>(); } if (playerResources != null) { Debug.Log ("STORAGE: Added to list of storage!"); playerResources.storageBuildings.Add(this); } if (playerUI == null) { playerUI = GameObject.FindGameObjectWithTag("Capital").GetComponent<Player_UIHandler>(); } }
void Awake() { instance = this; }