Game-Design / Sprint3 / ActiveItems / Boomerang.cs
Boomerang.cs
Raw
using Microsoft.Xna.Framework.Graphics;
using Sprint2_actual.StateFiles;
using System;
using System.Collections.Generic;
using System.Text;

namespace Sprint2_actual.ActiveItems
{
    public class Boomerang : IActiveItem
    {
        private ILink link;
        private Game1 game;
        private Texture2D texture;
        public Boomerang(ILink link, Game1 game)
        {
            this.link = link;
            this.game = game;
            texture = game.PlayerTexture;
        }
        public void ActiveItemDown()
        {
            GlobalVars.ProjectileList.Add(new DownBoomerangSprite(link, texture));
        }

        public void ActiveItemLeft()
        {
            GlobalVars.ProjectileList.Add(new LeftBoomerangSprite(link, texture));
        }

        public void ActiveItemRight()
        {
            GlobalVars.ProjectileList.Add(new RightBoomerangSprite(link, texture));
        }

        public void ActiveItemUp()
        {
            GlobalVars.ProjectileList.Add(new UpBoomerangSprite(link, texture));
        }
    }
}