using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Sprint3_actual.StateFiles; using System; using System.Collections.Generic; using System.Text; namespace Sprint3_actual { class LinkSpriteRightAttack : ISprite { private Texture2D Texture { get; set; } private int SpriteHeight { get; set; } private int SpriteWidth { get; set; } private int SpriteX { get; set; } private int SpriteY { get; set; } private Link link; public LinkSpriteRightAttack(Link link) { Texture = link.texture; SpriteWidth = 27; //Width of the sprite SpriteHeight = 15; //Height of the sprite (longer since using sword) SpriteY = 77;//Where the top left corner of the sprite is on the sprite sheet SpriteX = 18;//Where the top left corner of the sprite is on the sprite sheet this.link = link; } public void draw() { Rectangle sourceRectangle = new Rectangle(SpriteX, SpriteY, SpriteWidth, SpriteHeight); Rectangle destinationRectangle = new Rectangle(link.linkX, link.linkY, 81, 48); GlobalVars.spriteBatch.Draw(Texture, destinationRectangle, sourceRectangle, link.linkColor); } public void update(GameTime gameTime) { } } }