forked from endernon/PGRData
14 lines
No EOL
497 B
Lua
14 lines
No EOL
497 B
Lua
local XHomeCharIsDirectInteract = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode, "HomeCharIsDirectInteract", CsBehaviorNodeType.Condition, true, true)
|
|
|
|
function XHomeCharIsDirectInteract:OnEnter()
|
|
self.PlayerId = self.AgentProxy:GetPlayerId()
|
|
end
|
|
|
|
function XHomeCharIsDirectInteract:OnUpdate(dt)
|
|
local result = self.AgentProxy:CheckIsDirectInteract()
|
|
if result then
|
|
self.Node.Status = CsNodeStatus.SUCCESS
|
|
else
|
|
self.Node.Status = CsNodeStatus.FAILED
|
|
end
|
|
end |