示例#1
0
 private void Update()
 {
     if (!Tween.IsPaused)
     {
         _timeElapsed += Time.deltaTime;
         if (_timeElapsed > _duration)
         {
             PrefabPool.Return(this);
         }
     }
 }
示例#2
0
 private void ClearGridItemInstances()
 {
     for (int i = 0; i < _gridItemInstances.Count; i++)
     {
         if (_gridItemInstances[i] != null)
         {
             // Destroy(_gridItemInstances[i].gameObject);
             PrefabPool.Return(_gridItemInstances[i]);
         }
     }
     _gridItemInstances.Clear();
 }
示例#3
0
 private void DestroyGridItemView(GridItemView gridItem)
 {
     gridItem.Invalidate();
     _gridItemInstances.Remove(gridItem);
     PrefabPool.Return(gridItem);
 }