Пример #1
0
    // 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>();
        }
    }
Пример #2
0
    // 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>();
        }
    }
Пример #3
0
 void Awake()
 {
     instance = this;
 }