コード例 #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
ファイル: Storage.cs プロジェクト: cesarrac/TheyRise
    // 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;
 }