예제 #1
0
    public override void Unequip()
    {
        IHasAmmo ammoHolder = wielder as IHasAmmo;

        if (ammoHolder != null)
        {
            ammoHolder.StoreAmmo(inventory.RetrieveAllItems());
        }

        ItemBaseUnequip();
    }
예제 #2
0
    public override void ApplyPowerUp(object obj)
    {
        IHasAmmo receiver = obj as IHasAmmo;

        if (receiver == null)
        {
            return;
        }

        receiver.StoreAmmo(ammoType, ammo);
        this.QueueFree();
    }
예제 #3
0
    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();
    }