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

15 lines
No EOL
476 B
Lua

---@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