Game-Design / Sprint3 / Commands / LinkItemFireCommand.cs
LinkItemFireCommand.cs
Raw
using Sprint2_actual.ActiveItems;

namespace Sprint2_actual.Commands
{
    public class LinkItemFireCommand : ICommand
    {
        private Game1 game1;
        public LinkItemFireCommand(Game1 game)
        {
            this.game1 = game;
        }

        public void Execute()
        {
            //Call method to have link use fire item or set links current held item to fire or create a new fire sprite using link's direction and position
            game1.Player.SetItem(new FireProjectile(game1.Player, game1));
            game1.Player.UseItem();
        }
    }

}