Exemplo n.º 1
0
 public void DeactivateObject(ICanBePooled car)
 {
     if (gameObjectPools.ContainsKey(car.Id))
     {
         gameObjectPools[car.Id].DeactivateObject(car);
     }
 }
Exemplo n.º 2
0
        public void UnlockObject(ICanBePooled car)
        {
            if (!gameObjectPools.ContainsKey(car.Id))
            {
                return;
            }

            gameObjectPools[car.Id].UnlockObject(car);
        }
Exemplo n.º 3
0
        public void DeactivateObject(ICanBePooled car)
        {
            if (!allPoolObjects.ContainsKey(car.Name) || !car.IsActive)
            {
                //Debug.Log("object doesn't exists");
                return;
            }

            car.SetActive(false);
            inactiveObjects.Enqueue(car);
        }
Exemplo n.º 4
0
        public void UnlockObject(ICanBePooled car)
        {
            if (!allPoolObjects.ContainsKey(car.Name))
            {
                //Debug.Log("object doesn't exists");
                return;
            }
            if (!waitingObjects.TryDequeue(out car))
            {
                return;
            }

            inactiveObjects.Enqueue(car);
        }