public void TryToBlend(SmoothieItem item) { if (!smoothiItems.Contains(item)) { smoothiItems.Remove(item); Destroy(item.gameObject); } }
/// <summary> /// Adds an item to the blender /// </summary> /// <param name="item">Item.</param> public void AddSmoothieItem(SmoothieItem item) { if (!smoothiItems.Contains(item)) { smoothiItems.Add(item); print("Item added"); if (onAddSmoothieItem != null) { onAddSmoothieItem(); } } }