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/IObjectsManager.cs | 131 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 V3/Objects/IObjectsManager.cs (limited to 'V3/Objects/IObjectsManager.cs') diff --git a/V3/Objects/IObjectsManager.cs b/V3/Objects/IObjectsManager.cs new file mode 100644 index 0000000..e8fa17b --- /dev/null +++ b/V3/Objects/IObjectsManager.cs @@ -0,0 +1,131 @@ +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using V3.Camera; +using V3.Map; + +namespace V3.Objects +{ + /// + /// Objects manager for all game objects, be is creatures or buildings or even simple landscape objects. + /// + public interface IObjectsManager + { + //***** FOR TESTING PURPOSES! + List AddToSelectables { get; } + List CreatureList { get; } + List UndeadCreatures { get; } + //List KingdromCreatures { get; } + //List PlebCreatures { get; } + //***** NOT FOR TESTING PURPOSES ANYMORE! + + /// + /// Gets the current player character. Usually the necromancer. + /// Do not set directly! Use CreatePlayerCharacter() instead! + /// + ICreature PlayerCharacter { get; } + + ICreature Boss { get; } + + ICreature Prince { get; } + + Castle Castle { get; } + + /// + /// If you load a new map with new objects you need to initialize the objects manager again. + /// (Or else you have all the current objects on the new map.) + /// + /// + void Initialize(IMapManager mapManager); + + /// + /// Removes all objects from the object manager. + /// + void Clear(); + + /// + /// Creates the player character. This should be the first thing you do + /// after you created or initialized the objects manager. + /// + /// + void CreatePlayerCharacter(Necromancer necromancer); + + /// + /// Creates the boss of the level. Game is won if the boss is killed. + /// + /// Some ICreature to kill for winning. + void CreateBoss(ICreature boss); + + /// + /// Create the prince, a small boss. + /// + /// Some hard ICreature to kill. + void CreatePrince(ICreature prince); + + /// + /// Creates a creature for the game and inserts it in the appropriate data structures. + /// + /// + void CreateCreature(ICreature creature); + + /// + /// Removes specified creature from the game. + /// + /// The creature to be removed. + void RemoveCreature(ICreature creature); + + /// + /// Draws all currently shown objects on the map. + /// + /// The sprite batch used. + /// Camera for calculating which objects need to be drawn. + void Draw(SpriteBatch spriteBatch, ICamera camera); + + /// + /// Draws a visual representation of the Quadtree. For debugging purposes. + /// + /// + void DrawQuadtree(SpriteBatch spriteBatch); + + /// + /// Update the behaviour of all creatures on the map. + /// + /// Current game time. + /// Did the player press the right mouse button? + /// Where is the mouse currently? + /// Camera for checking where to do important updates. + void Update(GameTime gameTime, bool rightButtonPressed, Vector2 rightButtonPosition, ICamera camera); + + /// + /// Imports the TextureObjects from the objects map layer for drawing things in the right order. + /// + /// + void ImportMapObjects(List textureObjects); + + /// + /// Get all objects in the given rectangles. + /// + /// The rectangle which defines the area of the returnes objects. + /// Game objects in the rectangle. + List GetObjectsInRectangle(Rectangle rectangle); + + /// + /// Gets all creatures which are in the given ellipse area. + /// + /// To check if creature is in ellipse area. + /// + List GetCreaturesInEllipse(Ellipse ellipse); + + /// + /// Playing around with some cheating codes. + /// + void ExposeTheLiving(); + + /// + /// Checks if a creature is standing in a graveyard area. + /// + /// Check for this creature. + /// True when standing in graveyard area. + bool InGraveyardArea(ICreature creature); + } +} -- cgit v1.2.1