public void AddUrl(string url) { _urls.Add(url); if (_urls.Count == 3 && OnFull != null) { OnFull.Invoke(); } }
public void Add(ICard card) { if (cards.Count < maxAmount) { cards.Add(card); } if (cards.Count == maxAmount) { OnFull.Invoke(); } }
// 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(); } } } }
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(); } }