PGRData/Script/matrix/xrestaurant/xnode/XRestaurantIsExistNode.lua

15 lines
476 B
Lua
Raw Normal View History

2024-09-01 22:49:41 +02:00
---@class XRestaurantIsExistNode : XLuaBehaviorNode
---@field AgentProxy XRestaurantCharAgent
local XRestaurantIsExistNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode,
"RestaurantIsExist", CsBehaviorNodeType.Condition, true, false)
function XRestaurantIsExistNode:OnEnter()
local isExist = self.AgentProxy:DoIsExist()
if isExist then
self.Node.Status = CsNodeStatus.SUCCESS
else
self.Node.Status = CsNodeStatus.FAILED
end
end