]> Dogcows Code - chaz/carfire/commitdiff
Monster has health now.
authorKyle <Kyle@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Mon, 26 Apr 2010 01:34:19 +0000 (01:34 +0000)
committerKyle <Kyle@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Mon, 26 Apr 2010 01:34:19 +0000 (01:34 +0000)
git-svn-id: https://bd85.net/svn/cs3505_group@147 92bb83a3-7c8f-8a45-bc97-515c4e399668

CarFire/CarFire/CarFire/SaberMonster.cs

index 91d82a093f495a666c07f9aa65c71f8dc3154fcc..2d711a4e812159e55fbecc72092528ee58a2e8df 100644 (file)
@@ -28,6 +28,8 @@ namespace CarFire
     /// </summary>\r
     public class SaberMonster : IMonster\r
     {\r
     /// </summary>\r
     public class SaberMonster : IMonster\r
     {\r
+        //starting health\r
+        int health = 100;\r
         /// <summary>\r
         /// Construct this type of monster.  This constructor is called\r
         /// by the map when the game requests entities.\r
         /// <summary>\r
         /// Construct this type of monster.  This constructor is called\r
         /// by the map when the game requests entities.\r
@@ -196,9 +198,8 @@ namespace CarFire
         /// </summary>\r
         public int Health\r
         {\r
         /// </summary>\r
         public int Health\r
         {\r
-            //TODO do this right\r
-            get { return 0; }\r
-            //get { throw new NotImplementedException(); }\r
+            get { return this.health; }\r
+            \r
         }\r
 \r
         /// <summary>\r
         }\r
 \r
         /// <summary>\r
@@ -207,8 +208,7 @@ namespace CarFire
         /// <param name="amount"></param>\r
         public void causeDamageTo(int amount)\r
         {\r
         /// <param name="amount"></param>\r
         public void causeDamageTo(int amount)\r
         {\r
-            //TODO do this right\r
-            //throw new NotImplementedException();\r
+            this.health -= amount;\r
         }\r
 \r
         /// <summary>\r
         }\r
 \r
         /// <summary>\r
This page took 0.021023 seconds and 4 git commands to generate.