public override void Unequip() { IHasAmmo ammoHolder = wielder as IHasAmmo; if (ammoHolder != null) { ammoHolder.StoreAmmo(inventory.RetrieveAllItems()); } ItemBaseUnequip(); }
public override void ApplyPowerUp(object obj) { IHasAmmo receiver = obj as IHasAmmo; if (receiver == null) { return; } receiver.StoreAmmo(ammoType, ammo); this.QueueFree(); }
public override void ApplyPowerUp(object obj) { IHasAmmo receiver = obj as IHasAmmo; if (receiver == null) { return; } List <Item> ammoItems = Item.BulkFactory(Item.Types.Ammo, ammo); receiver.StoreAmmo(Item.ConvertListToData(ammoItems)); this.QueueFree(); }