From ced3d03bdb3ce866d832e03fb212865140905a9a Mon Sep 17 00:00:00 2001 From: Thomas Leyh Date: Sun, 24 Jul 2016 08:14:18 +0200 Subject: Add project files. --- V3/Objects/Sprite/ISpriteCreature.cs | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 V3/Objects/Sprite/ISpriteCreature.cs (limited to 'V3/Objects/Sprite/ISpriteCreature.cs') diff --git a/V3/Objects/Sprite/ISpriteCreature.cs b/V3/Objects/Sprite/ISpriteCreature.cs new file mode 100644 index 0000000..1339b2a --- /dev/null +++ b/V3/Objects/Sprite/ISpriteCreature.cs @@ -0,0 +1,53 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; + +namespace V3.Objects.Sprite +{ + /// + /// + /// + public interface ISpriteCreature + { + /// + /// Loads the texture file and prepares animations. + /// + /// Content manager used. + void Load(ContentManager contentManager); + + /// + /// Draws the sprite on the screen. + /// + /// Sprite batch used for drawing. + /// Position on the screen in pixels where the sprite should stand. + /// What moveset will be used? (Moving, Attacking...) + /// Where does the sprite face to? + void Draw(SpriteBatch spriteBatch, Vector2 position, MovementState movementState, MovementDirection movementDirection); + + /// + /// Draws a static image of the sprite. No animations. + /// + /// Sprite batch used for drawing. + /// Position of the sprite in pixels. (Where are the feet of the sprite placed. + /// What moveset will be used? (Moving, Attacking...) + /// Where does the sprite face to? + void DrawStatic(SpriteBatch spriteBatch, + Point position, + MovementState movementState, + MovementDirection movementDirection); + + /// + /// Change the sprite to show an animation. + /// + /// Elapsed game time is used for calculating FPS. + void PlayAnimation(GameTime gameTime); + + /// + /// Plays the specified animation fully, but only once. + /// + /// For which movement state the animation should be played. + /// How long (or how slow) should the animation be? + void PlayOnce(MovementState animation, TimeSpan duration); + } +} \ No newline at end of file -- cgit v1.2.1