aronalee / swm_14_div_study

</div>팀의 클린코드 스터디
1 stars 0 forks source link

[GoF] State Pattern #17

Closed aronalee closed 1 year ago

aronalee commented 1 year ago

요약


사용처

state pattern에는 게임쪽에서 사용처를 찾을 수 있었다. state pattern은 캐릭터가 상태에 따른 움직임을 다르게 만들 수 있다. 캐릭터가 물속에 있으면 수영 모션을 취하거나 땅에 있으면 걷기 모션을 취하는 방식으로 만들어서 같은 행동을 하더라도 상태나 환경에 따라 다르게 움직일 수 있다

chj990707 commented 1 year ago