[내일 배움 캠프 Unity 4기] Final Project W12D5 07.05 TIL

김용준·2024년 7월 5일
0

내일배움캠프

목록 보기
44/47

Goals

  • Discuss the states of player with team member

Player behaviour; group of input, state and action

After triming the input system on the player, I aimed to develop the player state and action by using finite state macine(FSM). During writing the scripts, I recognized the unexpected case of behaviour which doesn't require input. Right next, I draw the whole behaviours with its input, state and action. The following figure is the whole cases of behaviour.

The ideal case consist input, state change and action. The movement, attack or interaction with NPC can be explained by this. Since I write scripts for this case, The other case need the discussion. Removing the unusable cases; single component(only input, state change, action), absence of action. I need to configure the remained case that doesn't requires input.

Previously I have written all actions binded with the input. Changes of the invoking of action and state change to the trigger make me think a lot. Finally I decided to divide the action part into two. The one which requires input data will be written on the Behaviour* class. However, the action which don't need the input data such as animation control would be preferred to be in the Enter() or Exit() on the State* class.

profile
꿈이큰개발자지망생

0개의 댓글