public void AddUrl(string url)
 {
     _urls.Add(url);
     if (_urls.Count == 3 && OnFull != null)
     {
         OnFull.Invoke();
     }
 }
示例#2
0
 public void Add(ICard card)
 {
     if (cards.Count < maxAmount)
     {
         cards.Add(card);
     }
     if (cards.Count == maxAmount)
     {
         OnFull.Invoke();
     }
 }
示例#3
0
    // Called when product is dropped into shelf
    public void AddProduct(ProductInfo product)
    {
        //Check if we want this product in this shelf
        if (product.Product.productName == m_Product.name)
        {
            m_Products.Add(product);

            if (m_Products.Count == m_ProductAmount)
            {
                if (OnFull != null)
                {
                    OnFull.Invoke();
                }
            }
        }
    }
示例#4
0
 public void CollectShield(GameObject obj)
 {
     if (!obj.tag.Equals("Shield"))
     {
         return;
     }
     if (current >= Places.Length)
     {
         return;
     }
     obj.GetComponent <Collectable>().Animate = false;
     obj.transform.SetPositionAndRotation(Places[current].transform.position, Quaternion.LookRotation(Places[current].transform.forward, Places[current].transform.up));
     current++;
     if (!hasFreePlace())
     {
         OnFull?.Invoke();
         this.Door.GetComponent <Door>().DoorOpen();
     }
 }