コード例 #1
0
 public bool GiveBack(IPoolWater poolWater)
 {
     bool isSuccess = false;
     if (poolWater.ownerPool.Equals(this))
     {
         poolWater.Rest();
         (poolWater as Component).transform.parent = transform;
         restingWaterList.Add(poolWater);
         workingWaterList.Remove(poolWater);
     }
     return isSuccess;
 }
コード例 #2
0
 private void AddRestingWater(int num)
 {
     for (int i = 0; i < num; i++)
     {
         GameObject tempGO = Instantiate(prefab, transform);
         IPoolWater poolWater = tempGO.GetComponent<IPoolWater>();
         if (poolWater != null)
         {
             poolWater.ownerPool = this;
             poolWater.Rest();
             restingWaterList.Add(poolWater);
         }
     }
 }