X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FSaberMonster.cs;h=91d82a093f495a666c07f9aa65c71f8dc3154fcc;hb=1959205421a9a20c48133f93102e467b0f8e26f8;hp=c2932eed05f96802579e167bc08da82dc121b0e6;hpb=7ffb03574d79049fc13fc08412b4f62ad309874d;p=chaz%2Fcarfire diff --git a/CarFire/CarFire/CarFire/SaberMonster.cs b/CarFire/CarFire/CarFire/SaberMonster.cs index c2932ee..91d82a0 100644 --- a/CarFire/CarFire/CarFire/SaberMonster.cs +++ b/CarFire/CarFire/CarFire/SaberMonster.cs @@ -100,8 +100,12 @@ namespace CarFire PathFinder pathFinder = new PathFinder(mGame.Grid); mPath = new List(32); mPath.Add(Coordinates); - mPath.AddRange(pathFinder.GetPath(mMotion.Coordinates, mIdlePath[mIdlePathIndex])); - mPath.Add(mIdlePath[mIdlePathIndex]); + List path = pathFinder.GetPath(mMotion.Coordinates, mIdlePath[mIdlePathIndex]); + if (path != null) + { + mPath.AddRange(path); + mPath.Add(mIdlePath[mIdlePathIndex]); + } mPathIndex = 0; } @@ -115,8 +119,12 @@ namespace CarFire PathFinder pathFinder = new PathFinder(mGame.Grid); mPath = new List(32); mPath.Add(Coordinates); - mPath.AddRange(pathFinder.GetPath(mMotion.Coordinates, mIdlePath[mIdlePathIndex % mIdlePath.Count])); - mPath.Add(mIdlePath[mIdlePathIndex % mIdlePath.Count]); + List path = pathFinder.GetPath(mMotion.Coordinates, mIdlePath[mIdlePathIndex % mIdlePath.Count]); + if (path != null) + { + mPath.AddRange(path); + mPath.Add(mIdlePath[mIdlePathIndex % mIdlePath.Count]); + } mPathIndex = 0; } @@ -188,7 +196,9 @@ namespace CarFire /// public int Health { - get { throw new NotImplementedException(); } + //TODO do this right + get { return 0; } + //get { throw new NotImplementedException(); } } /// @@ -197,7 +207,8 @@ namespace CarFire /// public void causeDamageTo(int amount) { - throw new NotImplementedException(); + //TODO do this right + //throw new NotImplementedException(); } ///