コード例 #1
0
    public void Initialize()
    {
        for (int i = 0; i < this.maxPoolSize; i++)
        {
            PlayerPool poolableObject = new PlayerPool();

            poolableObject = GameObject.Instantiate <PlayerPool> (this.poolableObjectCopy, this.poolableParent);
            poolableObject.Initialize();
            poolableObject.gameObject.SetActive(false);
            this.availableObjects.Add(poolableObject);

            /*
             * for (int j = 0; j < 3; j++) {
             *      poolableObject[j] = GameObject.Instantiate<APoolable> (this.poolableObjectCopy[j], this.poolableParent[j]);
             *      poolableObject[j].Initialize ();
             *      poolableObject[j].gameObject.SetActive (false);
             *      this.availableObjects.Add (poolableObject[j]);
             * }*/
        }
    }