local Base = require "Battle/Logic/Entity/State/State_Node" local State_RunStop = class("State_RunStop",Base) --[[ 进入跑停止 --]] function State_RunStop:StateIn(entity, skillID, animName, command) Base.StateIn(self, entity, skillID, LuaConst.Animation_run_stop, command) if entity.components.buff and entity.components.buff:CheckHasBuffState(LuaConst.SpecialBuffs.InRiding) then entity.components.anim:SetCurAnimID(LuaConst.Animation_horseStop,LuaConst.MoveMode.ByAnimation) else entity.components.anim:SetCurAnimID(LuaConst.Animation_run_stop,LuaConst.MoveMode.ByAnimation) end end --[[ 退出 --]] function State_RunStop:StateOut(entity, skillID, animName, command) Base.StateOut(self, entity, skillID, LuaConst.Animation_run_loop, command) end --无cmd输入时 function State_RunStop:StateUpdateNoCmd(entity) local stateType = LuaConst.StateType.None if entity.components.anim.IsCurAnimOver then stateType = LuaConst.StateType.Idle end return stateType end return State_RunStop