function main() { local SM = StateMachine.GetInstance(); SM.RegisterState(CHARACTERJOB.SWORDMAN, "Character_Rest", 0); SM.RegisterState(CHARACTERJOB.SWORDMAN, "Character_Move", 1); }