PGRData/Script/matrix/xguide/node/XGuideStartNode.lua
2024-09-01 22:49:41 +02:00

16 lines
594 B
Lua

local XGuideStartNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode, "GuideStart",CsBehaviorNodeType.Action,true,false)
--引导开启节点
function XGuideStartNode:OnStart()
self.GuideId = self.BehaviorTree:GetLocalField("GuideId").Value
end
function XGuideStartNode:OnEnter()
self.AgentProxy:ShowMask(false,true)
XDataCenter.GuideManager.ReqGuideOpen(self.GuideId,function()
self.Node.Status = CsNodeStatus.SUCCESS
CS.XGuideEventPass.IsFightGuide = false
CsXGameEventManager.Instance:Notify(XEventId.EVENT_GUIDE_START, self.GuideId)
end)
end