]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/SaberMonster.cs
New property IEntity.IsCollidable so entities can let the collision code know whether...
[chaz/carfire] / CarFire / CarFire / CarFire / SaberMonster.cs
index ce5916987a472986505a8c5f2c6284c2f89f14b5..a3507c87f6006642655594aaa009555cbc283f1c 100644 (file)
@@ -28,6 +28,8 @@ namespace CarFire
     /// </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
@@ -196,7 +198,8 @@ namespace CarFire
         /// </summary>\r
         public int Health\r
         {\r
-            get { throw new NotImplementedException(); }\r
+            get { return this.health; }\r
+            \r
         }\r
 \r
         /// <summary>\r
@@ -205,9 +208,11 @@ namespace CarFire
         /// <param name="amount"></param>\r
         public void causeDamageTo(int amount)\r
         {\r
-            throw new NotImplementedException();\r
+            this.health -= amount;\r
         }\r
 \r
+        public bool IsCollidable { get { return true; } }\r
+\r
         /// <summary>\r
         /// Get the smoothed position.\r
         /// </summary>\r
This page took 0.020037 seconds and 4 git commands to generate.