previously, I introduce how Image drawing and state working in AF(ActionFighter). and this time I'll explain how AF use state and receive input and process this.
in one SkillMap, it contain owner AF and 6 of initial state of skill.
(continuous next state is created and called by this state's inputSlot function)
addSkill function overlay initiated skill on wanted slot and by getSkill, you can get that slot's reference.
now Let's see ActionFighter's variable.
state Changed by input is saved in skillMap's slot. but AF need more state change except on input and that kind of state saved in AF directly.these states initiate when AF created.
CurState: AF's current activating state.CurSkillMap: AF's current activating skillMap.
AtkSkillMap: skillMap saving attacking skills, activating by leftClick.
DefSkillMap: skillMap saving defencing skills, activating by rightClick.
IdleState: defult State. idleState will be explain lately.
DamagedState: when AF take damage, change to this state.
DeadState: when you die.
PushedState: AF pushed by special situation.
EventState: state for eventScene
AF change it's state on various situation.
it Mean AF change it's state by calling curState's function.
- damagedwhen AF take damage by target, curState's damaged function called and it process it's action in curState.
when tick event call, curState's Update called.
- inputSlotthis is BitmapWorld's special inputStyle. by drag mouse to each 6 direction, you can get slot data.
according to slot input, curState's inputSlot data changed. but before that, it need to convert mouse input to slot input.
first, by click mouse, mouse position is initiated and skillMap activated.
row inputProcess in playerController. It will explain later.
this graph attached to tick event' sequence 2.
by this, ActionFighter's major performance is explained.
next I'll introduce PlayerConteroller that work for player input.