diff options
author | Thomas Leyh <leyh.thomas@web.de> | 2016-07-24 08:14:18 +0200 |
---|---|---|
committer | Thomas Leyh <leyh.thomas@web.de> | 2016-07-24 08:14:18 +0200 |
commit | ced3d03bdb3ce866d832e03fb212865140905a9a (patch) | |
tree | 2a16c2063a46d3c354ce1585029dda3124f6ad93 /V3/Objects/Sprite/ISpriteCreature.cs | |
parent | 0394dccaf06e1009e591a6ff4d645895574724c1 (diff) | |
download | V3-release.tar.gz V3-release.tar.bz2 |
Diffstat (limited to 'V3/Objects/Sprite/ISpriteCreature.cs')
-rw-r--r-- | V3/Objects/Sprite/ISpriteCreature.cs | 53 |
1 files changed, 53 insertions, 0 deletions
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 +{ + /// <summary> + /// + /// </summary> + public interface ISpriteCreature + { + /// <summary> + /// Loads the texture file and prepares animations. + /// </summary> + /// <param name="contentManager">Content manager used.</param> + void Load(ContentManager contentManager); + + /// <summary> + /// Draws the sprite on the screen. + /// </summary> + /// <param name="spriteBatch">Sprite batch used for drawing.</param> + /// <param name="position">Position on the screen in pixels where the sprite should stand.</param> + /// <param name="movementState">What moveset will be used? (Moving, Attacking...)</param> + /// <param name="movementDirection">Where does the sprite face to?</param> + void Draw(SpriteBatch spriteBatch, Vector2 position, MovementState movementState, MovementDirection movementDirection); + + /// <summary> + /// Draws a static image of the sprite. No animations. + /// </summary> + /// <param name="spriteBatch">Sprite batch used for drawing.</param> + /// <param name="position">Position of the sprite in pixels. (Where are the feet of the sprite placed.</param> + /// <param name="movementState">What moveset will be used? (Moving, Attacking...)</param> + /// <param name="movementDirection">Where does the sprite face to?</param> + void DrawStatic(SpriteBatch spriteBatch, + Point position, + MovementState movementState, + MovementDirection movementDirection); + + /// <summary> + /// Change the sprite to show an animation. + /// </summary> + /// <param name="gameTime">Elapsed game time is used for calculating FPS.</param> + void PlayAnimation(GameTime gameTime); + + /// <summary> + /// Plays the specified animation fully, but only once. + /// </summary> + /// <param name="animation">For which movement state the animation should be played.</param> + /// <param name="duration">How long (or how slow) should the animation be?</param> + void PlayOnce(MovementState animation, TimeSpan duration); + } +}
\ No newline at end of file |