// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Scripting/SerializableScriptingObject.h" #include "BehaviorTypes.h" /// /// Base class for Behavior Tree nodes. /// API_CLASS(Abstract) class FLAXENGINE_API BehaviorTreeNode : public SerializableScriptingObject { DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(BehaviorTreeNode, SerializableScriptingObject); public: /// /// Node user name (eg. Follow Enemy, or Pick up Weapon). /// API_FIELD() String Name; // TODO: decorators/conditionals // TODO: instance data ctor/dtor // TODO: start/stop methods // TODO: update method /// /// Initializes node state. Called after whole tree is loaded and nodes hierarchy is setup. /// /// Node owner asset. API_FUNCTION() virtual void Init(BehaviorTree* tree) { } void Serialize(SerializeStream& stream, const void* otherObj) override; void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override; };