Didn't do much today. Work took a while and I don't really feel like it right now. I did put in about 10 minutes trying to work. I have at least identified the next thing I need to do, which is figuring out how the enemies will be set to "On" or "Off" upon player entering/exiting room respectively.
Perhaps there can be an ActorManager/EnemyManager. It would listen to RoomTrigger.OnRoomEnter/Exit which is already implemented, and update the appropriate actors. I'm not sure though. Maybe the Room should just have references to the actors in it and activate them. I am actually more in favor of this. I think splitting this functionality when it easily and logically fits into Room doesn't make sense.
So that's probably what I'll do. Have Room keep a list of all Actors in it and activate them when necessary.
The only question now is, should the AI Actors have their own parent class? i.e. Actor -> AIActor -> Enemy. I'm not sure. I need to find out if this OnRoomEntered event notification is useful to non-AI Actors. If so, then don't make AIActor. If it really has no application to Actor, it may be worth it. But I should consider what other applications this could have. If they are realistic, then might just do it.
We'll see.

No comments:
Post a Comment