madrusec/AI_Project_2 — pull request #11 by galaxode (2014-03-22 23:04:43+00:00)
Title: Changes to StateController, NPC1ItemController, added NPC1Health

In Space Maze: Attacking code is combined with the new StateController so NPC does not have to follow your mouse click when you attack. Also modified gem search code inside StateController so that if NPC1 life is low (below 4 poitns) it will stop attacking and go find a gem to heal itself. A gem will heal it for 1 point. It should continue searching for gems until life is 4. Added code for ammo damage to NPC1 but commented it out because this caused his own ammo to damage himself.

Please take a look. To add to Grassy Field just add State Controller and deactivate NPC1StateController. Add NPC1Health and make sure to put values for public variables in inspector. (in NPC1Health: max health, health meter, damage multiplier. In NPC1ItemController: damage multiplier) maybe I should have put a default for those values.