private void Update() { if (Input.GetKeyDown(KeyCode.A)) { fsm.performTransition((int)StateID.Run); } else if (Input.GetKeyDown(KeyCode.S)) { fsm.performTransition((int)StateID.Desth); } }
private void updateFsmSystem() { if (Input.GetMouseButtonDown(0)) { fsm.performTransition((int)StateID.Draw); } else if (Input.GetMouseButtonUp(0)) { fsm.performTransition((int)StateID.instantiation); } fsm.Update(); }
private void initFsm() { fsm = new Currency_FSMSystem(); Currency_FSMState runState = new Player_RunState(fsm, (int)StateID.Run); Currency_FSMState desthState = new Player_DeathState(fsm, (int)StateID.Desth); fsm.addState(runState); fsm.addState(desthState); fsm.performTransition((int)StateID.Run); UpdateManager.add_playerEventList_(updateFsmSystem); }