PGRData/Script/matrix/xrestaurant/xnode/XRestaurantBubbleIndexNode.lua
2024-09-01 22:49:41 +02:00

24 lines
No EOL
700 B
Lua

---@class XRestaurantBubbleIndexNode : XLuaBehaviorNode
---@field AgentProxy XRestaurantCharAgent
local XRestaurantBubbleIndexNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode,
"RestaurantBubbleIndex", CsBehaviorNodeType.Action, true, false)
function XRestaurantBubbleIndexNode:OnAwake()
if self.Fields == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
if self.Fields["Index"] == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
self.Index = self.Fields["Index"]
end
function XRestaurantBubbleIndexNode:OnEnter()
self.AgentProxy:DoBubbleIndex(self.Index)
self.Node.Status = CsNodeStatus.SUCCESS
end