void Update() { for (int i = ownedItems.Count - 1; i >= 0; i--) { ItemBase item = ownedItems[i]; if (item.State == ItemBase.ItemState.Using) { item.OnUsing(); } else if (item.State == ItemBase.ItemState.Consumed && item.CheckIfFinished()) { item.ClearEffects(); ownedItems.Remove(item); Destroy(item); } else { item.UpdateEffects(); } } }