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 LinkSpriteDownAttack : 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 Vector2 pos; private Link link; public LinkSpriteDownAttack(Link link) { Texture = link.texture; SpriteWidth = 16; //Width of the sprite SpriteHeight = 28; //Height of the sprite (longer since using sword) SpriteY = 47;//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, GlobalVars.linkWH, 84); GlobalVars.spriteBatch.Draw(Texture, destinationRectangle, sourceRectangle, link.linkColor); } public void update(GameTime gameTime) { } } }