GSServer-CBT/soggy_resources/lua/Actor/BaseActorMode.lua

23 lines
501 B
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

----------------------
-- 这是Lua端ActorMode的基类包含了一些Actor在特殊情况下的模式定义.
-- @classmod BaseActorMode
require('Base/Class')
local BaseActorMode = class("BaseActorMode", nil)
--- 切换Mode
function BaseActorMode:SwitchMode(alias)
local actor = actorMgr:GetActorInternal(alias)
if actor == nil then
return
end
local modeFunc = self[alias]
if modeFunc == nil then
return
end
modeFunc(actor)
end
return BaseActorMode