public void set_state(creature_state state) { if(state != _state) { switch(state) { case creature_state.idle: { play_idle(); } break; case creature_state.run: { play_run(); } break; case creature_state.special: { play_special(); } break; case creature_state.wound: { play_wound(); } break; } } }
public void set_state(creature_state state) { //global_instance.Instance._crash_manager._History._mol_history.Count if (global_instance.Instance._crash_manager.getGameState() != gameState.game_playing) { return; } if (state != _state) { switch(state) { case creature_state.idle: { play_idle(); } break; case creature_state.run: { play_run(); } break; case creature_state.special: { play_special(); } break; case creature_state.wound: { play_wound(); } break; } _state = state; } if (isNeedRecord ()) { MolMoveHistory his = get_last_history(); CreatureMoveHistory creature_his = new CreatureMoveHistory(); creature_his._dir = get_dir(); if(_state == creature_state.idle) { creature_his._move = false; } else { creature_his._move = true; } creature_his.fram_index = _frame_count; creature_his._pos = get_position(); his._Creature_acts.Add(creature_his); set_last_history(his); } }