GSServer-CBT/soggy_resources/lua/Actor/Interaction/InteractionActorProxy.lua
Akbar Yahya e0d4d8040c melon
2022-11-21 16:30:31 +08:00

49 lines
1.5 KiB
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端InteractionActorProxy的基类包含一些全局控制函数。继承自SubGlobalActorProxy
-- @classmod InteractionActorProxy
local subGlobalActorProxy = require('Actor/SubGlobal/SubGlobalActorProxy')
local InteractionActorProxy = class("InteractionActorProxy", subGlobalActorProxy)
InteractionActorProxy.actorType = ActorType.INTERACTION_ACTOR
InteractionActorProxy.defaultAlias = "Interaction"
local super = nil
function InteractionActorProxy:OnPreInit()
super = self.__super
super:OnPreInit()
end
function InteractionActorProxy:CreateUActor(alias)
local uActor = actorUtils.CreateActor(self, ActorType.INTERACTION_ACTOR, alias, self.metaPath)
return uActor
end
--- InterActor当交互组开始时的回调
-- @tparam int interCnt 执行的InterGroup顺次从1开始
function InteractionActorProxy:OnInterStart(interCnt)
print("inter start cnt" .. tostring(interCnt))
end
--- InterActor当交互组结束时的回调
-- @tparam int interCnt 执行的InterGroup顺次从1开始
function InteractionActorProxy:OnInterFinish(interCnt)
print("inter finish cnt" .. tostring(interCnt))
end
function InteractionActorProxy:Register()
self.uActor:RegisterStartInterCallback(self.OnInterStart)
self.uActor:RegisterFinishInterCallback(self.OnInterFinish)
end
function InteractionActorProxy:Unregister()
self.uActor:UnregisterStartInterCallback(self.OnInterStart)
self.uActor:UnregisterStartInterCallback(self.OnInterFinish)
end
function InteractionActorProxy:Start()
end
return InteractionActorProxy