From a716edefa6148bb1847b7029356d610a1886821f Mon Sep 17 00:00:00 2001 From: brady Date: Tue, 27 Apr 2010 06:32:44 +0000 Subject: [PATCH] Adding AI to monsters. AI still has some bugs to be worked out. Put it should compile and run. git-svn-id: https://bd85.net/svn/cs3505_group@159 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- CarFire/CarFire/CarFire/AI.cs | 5 +- .../CarFire/Content/Content.contentproj | 19 +- .../Content/Maps/colosseumClosed.cfmap | 76 +++++ CarFire/CarFire/CarFire/Game.cs | 25 +- CarFire/CarFire/CarFire/IPlayer.cs | 3 + CarFire/CarFire/CarFire/SaberMonster.cs | 10 +- CarFire/CarFire/CarFire/SaberMonster2.cs | 305 ++++++++++++++++++ 7 files changed, 429 insertions(+), 14 deletions(-) create mode 100644 CarFire/CarFire/CarFire/Content/Maps/colosseumClosed.cfmap create mode 100644 CarFire/CarFire/CarFire/SaberMonster2.cs diff --git a/CarFire/CarFire/CarFire/AI.cs b/CarFire/CarFire/CarFire/AI.cs index 8b8a25f..716b978 100644 --- a/CarFire/CarFire/CarFire/AI.cs +++ b/CarFire/CarFire/CarFire/AI.cs @@ -63,7 +63,10 @@ namespace CarFire { return regionList[regions[curX, curY]].VisibleRegions.Contains(regions[testX, testY]); } - + public bool spaceVisible(Point Monster, Point Player ) + { + return regionList[regions[Monster.X, Monster.Y]].VisibleRegions.Contains(regions[Player.X, Player.Y]); + } //find regions in map. these regions will be large groups of connected grid squares. public int setUpRegions() { diff --git a/CarFire/CarFire/CarFire/Content/Content.contentproj b/CarFire/CarFire/CarFire/Content/Content.contentproj index 971b516..ef3c88e 100644 --- a/CarFire/CarFire/CarFire/Content/Content.contentproj +++ b/CarFire/CarFire/CarFire/Content/Content.contentproj @@ -143,13 +143,6 @@ PassThroughProcessor - - - colosseum - MapImporter - PassThroughProcessor - - blueDemonAttackDieStand @@ -302,6 +295,18 @@ TextureProcessor + + + colosseum + MapImporter + PassThroughProcessor + + + colosseumClosed + MapImporter + PassThroughProcessor + +