]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/Game.cs
New IEntity properties: Coordinates (set), Identifier. Loadable entities should...
[chaz/carfire] / CarFire / CarFire / CarFire / Game.cs
index 1486e6572a66eb31db5b6413620342eb58efe85b..f78945b65d21fc85bf8fe94624d4b2af6b16b621 100644 (file)
@@ -240,6 +240,11 @@ namespace CarFire
 \r
         #region Public Methods\r
 \r
+        /// <summary>\r
+        /// Get an entity at a certain place on the map.\r
+        /// </summary>\r
+        /// <param name="point">The coordinates.</param>\r
+        /// <returns>The entity, or null if none is at that location.</returns>\r
         public IEntity GetEntityAtCoordinates(Point point)\r
         {\r
             foreach (IEntity entity in State.Entities)\r
@@ -249,6 +254,11 @@ namespace CarFire
             return null;\r
         }\r
 \r
+        /// <summary>\r
+        /// Get a player at a certain place on the map.\r
+        /// </summary>\r
+        /// <param name="point">The coordinates.</param>\r
+        /// <returns>The player, or null if none is at that location.</returns>\r
         public Player GetPlayerAtCoordinates(Point point)\r
         {\r
             foreach (Player player in State.mCharacters)\r
@@ -258,6 +268,12 @@ namespace CarFire
             return null;\r
         }\r
 \r
+        /// <summary>\r
+        /// Determine if a cell is open, depending on the static scenery\r
+        /// of the map and if there are any collidable entities.\r
+        /// </summary>\r
+        /// <param name="point">The coordinates.</param>\r
+        /// <returns>True if the cell is open; false otherwise.</returns>\r
         public bool IsCellOpen(Point point)\r
         {\r
             if (!State.Map.IsCellOpen(point)) return false;\r
@@ -266,6 +282,37 @@ namespace CarFire
             return true;\r
         }\r
 \r
+        /// <summary>\r
+        /// Remove a specific entity from the game.  The entity can still\r
+        /// be tracked some other way, but it won't included when the game is\r
+        /// updating and drawing stuff.\r
+        /// </summary>\r
+        /// <param name="entity">The entity.</param>\r
+        /// <returns>The entity that was removed, or null if no entity was removed.</returns>\r
+        public IEntity RemoveEntity(IEntity entity)\r
+        {\r
+            if (State.Entities.Remove(entity)) return entity;\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Move on to the next map, and advance the level.\r
+        /// </summary>\r
+        public void AdvanceLevel()\r
+        {\r
+            // TODO: Load the next map, etc...\r
+        }\r
+\r
+        /// <summary>\r
+        /// Restart the current level.\r
+        /// </summary>\r
+        public void Reset()\r
+        {\r
+            State.Map.Reset();\r
+            // TODO: Do other stuff to reset everything.\r
+        }\r
+\r
+\r
         public Game()\r
         {\r
            \r
This page took 0.018922 seconds and 4 git commands to generate.