- Home /
Interface state structure with different type of enemies
Hello,
in the uploaded picture i have different kinds of enemies (Warrior, Hunter, Rouge) derived from a base class and some InterfaceStates (Idle, Patrol, MeleeAttack, RangedAttack).
- While the Warrior just stays still, the Hunter and the Rouge are rotating and looking around.
- The Hunter should switch between the PatrolState and IdleState sometimes.
- When it comes to combat the rouge can use melee or ranged attacks
I really don't have any experience how to do a good state structure. Do you have any inputs?
I askes my self for example:
- Should i create a seperate state for lookAround?
- Should i combine the melee and ranged attack state into one combat state?
- Should i check for the hunter subclass type in the idle interface to switch into patrol state or should i write the logic into the subclass? I could do seperate states as well (IdleHunter, IdleWarrior, IdleRouge)?
- More States, enemies, and attacks are about to come
Your answer
Follow this Question
Related Questions
Unity OnStateExit StateMachineBehaviour is never getting called 0 Answers
Easier way of creating transitions in the animator? 1 Answer
Question regarding FSM, are multiple Machines on the same Object recommended? 0 Answers
moving gameobject from state machine behaviour/different code result from inside OnStateExit() 1 Answer
How to delete a StateMachineBehaviour via Editor Script? 1 Answer