PGRData/Script/matrix/xdlcfight/sceneobject/0006.lua
2024-09-01 22:49:41 +02:00

51 lines
No EOL
1.6 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.

---@class XSObjVCamAgent
local XSObjVCamAgent = XDlcScriptManager.RegSceneObjScript(0006, "XSObjVCamAgent") --调用使用冒号
local FuncSet = CS.StatusSyncFight.XFightScriptFuncs --调用使用句号
---@param proxy StatusSyncFight.XScriptLuaProxy
function XSObjVCamAgent:Ctor(proxy)
self._proxy = proxy
self._triggerId = 0
self._localPlayerNpcId = 0
end
function XSObjVCamAgent:Init()
self._sceneObj = self._proxy:GetSceneObject()
self._sceneObjPlaceId = self._proxy:GetSceneObjectPlaceId()
self._vCamComp = self._sceneObj.VCamComponent
end
---@param dt number @ delta time
function XSObjVCamAgent:Update(dt)
end
---@param eventType number
---@param eventArgs userdata
function XSObjVCamAgent:HandleEvent(eventType, eventArgs)
end
function XSObjVCamAgent:OnResLoadComplete()
end
function XSObjVCamAgent:Terminate()
end
---@param ref number @用于坐标旋转参考的actorId填-1使用触发者。
---@param follow number @虚拟相机跟随的目标actorId填-1使用触发者。
---@param lookAt number @虚拟相机看向的目标actorId填-1使用触发者。
function XSObjVCamAgent:SetActorIds(ref, follow, lookAt)
self._vCamComp:SetActorIds(ref, follow, lookAt)
--XLog.Debug(string.format("XSObjVCamAgent.SetActorIds members:%d %d %d ", ref, follow, lookAt))
end
---设置一个回调,在虚拟相机被激活前调用。
---@param callback function
function XSObjVCamAgent:SetCallBackBeforeActivated(callback)
if type(callback) ~= "function" then
return
end
self._vCamComp.SetActorsCallBack = callback
end
return XSObjVCamAgent