X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fcarfire;a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FSaberMonster.cs;h=f417d52c160a1470935d4249506789033955b705;hp=91d82a093f495a666c07f9aa65c71f8dc3154fcc;hb=08f41ef45f3c41ca6302150bc6d5270c8e7143db;hpb=f67652c2fe85f9ba6c71dedbab26760775004e00
diff --git a/CarFire/CarFire/CarFire/SaberMonster.cs b/CarFire/CarFire/CarFire/SaberMonster.cs
index 91d82a0..f417d52 100644
--- a/CarFire/CarFire/CarFire/SaberMonster.cs
+++ b/CarFire/CarFire/CarFire/SaberMonster.cs
@@ -28,6 +28,8 @@ namespace CarFire
///
public class SaberMonster : IMonster
{
+ //starting health
+ int health = 100;
///
/// Construct this type of monster. This constructor is called
/// by the map when the game requests entities.
@@ -196,9 +198,8 @@ namespace CarFire
///
public int Health
{
- //TODO do this right
- get { return 0; }
- //get { throw new NotImplementedException(); }
+ get { return this.health; }
+
}
///
@@ -207,10 +208,11 @@ namespace CarFire
///
public void causeDamageTo(int amount)
{
- //TODO do this right
- //throw new NotImplementedException();
+ this.health -= amount;
}
+ public bool IsCollidable { get { return true; } }
+
///
/// Get the smoothed position.
///
@@ -219,7 +221,15 @@ namespace CarFire
///
/// Get the grid coordinates.
///
- public Point Coordinates { get { return mMotion.Coordinates; } }
+ public Point Coordinates {
+ get { return mMotion.Coordinates; }
+ set { mMotion = new MovementManager(value, mMotion.Speed); }
+ }
+
+ ///
+ /// Get the entity identifier.
+ ///
+ public char Identifier { get { return mId; } }
#endregion