Hi,
I have an actor node which I use in my game logic class to represent an actor in the game (held in a hash table list of actors by name). It holds basic information such as position, rotation, scale and state (walking, standing). Previously I had this as a process and during the onupdate() it would check the state and move the actor if the state was 'walking' and then move the actor and issue the appropriate move event. Now, I need to use this same actor node in my humanview view to keep track of the actors, but I can't have it moving the actor around as that is not the views job.
Should I move my code that moves the actor around out into an view similar to an ai view and attach the actor to it, or should I have two actor classes, one for use in the view and one for use by the game logic?
Hope I'm making some sort of sense.
Thanks!
Rael
I have an actor node which I use in my game logic class to represent an actor in the game (held in a hash table list of actors by name). It holds basic information such as position, rotation, scale and state (walking, standing). Previously I had this as a process and during the onupdate() it would check the state and move the actor if the state was 'walking' and then move the actor and issue the appropriate move event. Now, I need to use this same actor node in my humanview view to keep track of the actors, but I can't have it moving the actor around as that is not the views job.
Should I move my code that moves the actor around out into an view similar to an ai view and attach the actor to it, or should I have two actor classes, one for use in the view and one for use by the game logic?
Hope I'm making some sort of sense.
Thanks!
Rael
The post was edited 3 times, last by Raeldor ().