Ejemplo n.º 1
0
 public virtual bool CanGoPlayerSlot()
 {
     var PlayerSlots = FindObjectOfType<PlayerSlots>();
     if (PlayerSlots.CanHoldItem(orderID))
     {
         BasicGameEvents.RaiseOnProductAddedToSlot(orderID);
         return true;
     }
     else
         return false;
 }
Ejemplo n.º 2
0
        void AddToPlayerSpot()
        {
            var PlayerSlots = FindObjectOfType <PlayerSlots>();
            var product     = GetComponent <DrinkableProduct>();

            if (product != null && PlayerSlots != null)
            {
                if (PlayerSlots.CanHoldItem(product.orderID))
                {
                    BasicGameEvents.RaiseOnProductAddedToSlot(product.orderID);
                    StartCoroutine(product.AnimateGoingToSlot());
                }
            }
            else
            {
                Destroy(gameObject);
            }
        }
Ejemplo n.º 3
0
 private void OnMouseDown()
 {
     if (!doorIsOpen && !isEmpty)
     {
         var PlayerSlots = FindObjectOfType <PlayerSlots>();
         if (PlayerSlots.CanHoldItem(currentProduct.orderID))
         {
             BasicGameEvents.RaiseOnProductAddedToSlot(currentProduct.orderID);
             StartCoroutine(currentProduct.AnimateGoingToSlot());
             currentProduct = null;
             StartCoroutine(PlayDoorAnim(true, true));
         }
         else
         {
             return;
         }
     }
     else if (isEmpty)
     {
         StartCoroutine(PlayDoorAnim(true, true));
     }
 }