]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/Key.cs
New IEntity properties: Coordinates (set), Identifier. Loadable entities should...
[chaz/carfire] / CarFire / CarFire / CarFire / Key.cs
index 0fab663185772fd8cb20fbf9b553977b4be30a1c..cebad87c4cc2c0c8b7ec81fbbfa7a906a5c3b019 100644 (file)
@@ -10,11 +10,12 @@ namespace CarFire
 {\r
     /// <summary>\r
     /// A key entity.  Keys can be used to unlock doors... what a surprise.\r
+    /// All that stuff is handled by the trigger, though.\r
     /// </summary>\r
     public class Key : Trigger\r
     {\r
         #region Public Methods\r
-\r
+        \r
         /// <summary>\r
         /// Construct a key entity.\r
         /// </summary>\r
@@ -25,10 +26,9 @@ namespace CarFire
         public Key(char identifier, Point position, Dictionary<string, string> info, Game game) :\r
             base(identifier, position, info, game)\r
         {\r
-            mPosition = new Vector2(position.X, position.Y);\r
-            mGame = game;\r
+            // No implementation needed.\r
         }\r
-\r
+        \r
         public override void LoadContent(ContentManager contentManager)\r
         {\r
             mTexture = contentManager.Load<Texture2D>("default");\r
@@ -36,7 +36,7 @@ namespace CarFire
 \r
         public override void Draw(SpriteBatch spriteBatch)\r
         {\r
-            Rectangle position = mGame.State.Map.GetRectangleFromCoordinates(mPosition);\r
+            Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Position);\r
             spriteBatch.Draw(mTexture, position, Color.White);\r
         }\r
 \r
@@ -46,8 +46,6 @@ namespace CarFire
         #region Private Variables\r
 \r
         Texture2D mTexture;\r
-        Game mGame;\r
-        Vector2 mPosition;\r
 \r
         #endregion\r
     }\r
This page took 0.020262 seconds and 4 git commands to generate.