aboutsummaryrefslogtreecommitdiff
path: root/V3/Objects/Sprite/ISpriteCreature.cs
diff options
context:
space:
mode:
Diffstat (limited to 'V3/Objects/Sprite/ISpriteCreature.cs')
-rw-r--r--V3/Objects/Sprite/ISpriteCreature.cs53
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