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/Effects/IEffect.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 V3/Effects/IEffect.cs (limited to 'V3/Effects/IEffect.cs') diff --git a/V3/Effects/IEffect.cs b/V3/Effects/IEffect.cs new file mode 100644 index 0000000..73cf1ef --- /dev/null +++ b/V3/Effects/IEffect.cs @@ -0,0 +1,44 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using V3.Data; + +namespace V3.Effects +{ + /// + /// Interface for a single effect. + /// + public interface IEffect + { + /// + /// Is the effect playing at the moment? + /// + bool IsPlaying { get; } + + /// + /// Play the specific effect once, do not loop. + /// + /// Position where effect should be played. Points to the middle of the effect animation. + /// Size of the effect. + /// For checking the volume of the sound if there is one. + void PlayOnce(Point position, Point size, IOptionsManager optionsManager); + + /// + /// Update the effect. + /// + /// Game time used for checking animation duration. + void Update(GameTime gameTime); + + /// + /// Draw the effect. + /// + /// Sprite batch used. + void Draw(SpriteBatch spriteBatch); + + /// + /// Load graphics and possibly sound for the effect. + /// + /// Content manager used. + void LoadContent(ContentManager contentManager); + } +} \ No newline at end of file -- cgit v1.2.1