I've created a new abstract class "Combatant" which inherits from MapObject and is now the base class for both the old PlayerCharcter and the new Mob class. A combatant is everything which can attack or be attacked.
I've moved all player-character-specific logic from MapObjectController to a new PlayerCharacterController which calls the MapObjectController when a player wants to do something. That way I can keep the MapObjectController as generic and flexible as possible.
I already created the stub of a MobController. All monster AI will be implemented there. Implementing the AI in a wider scope than inside the Mob class will allow me to implement a Mob AI which is much more aware of what's happening around it.
No comments:
Post a Comment