![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include "BehaviorTree.h"#include "BehaviorTreeDependencyScanner.h"#include "../ECS_Components_AI.h"#include "../ECS_Components.h"#include "../World.h"#include "../system/system_utils.h"#include "../system/EventQueue.h"#include "../json_helper.h"#include "../CollisionMap.h"#include "../GameEngine.h"#include <cmath>#include <functional>#include <set>#include <fstream>
Include dependency graph for BehaviorTree.cpp:Go to the source code of this file.
Typedefs | |
| using | json = nlohmann::json |
Functions | |
| BTStatus | ExecuteBTNode (const BTNode &node, EntityID entity, AIBlackboard_data &blackboard, const BehaviorTreeAsset &tree) |
| BTStatus | ExecuteBTCondition (BTConditionType condType, float param, EntityID entity, const AIBlackboard_data &blackboard) |
| BTStatus | ExecuteBTAction (BTActionType actionType, float param1, float param2, EntityID entity, AIBlackboard_data &blackboard) |
| void | TickEventRoots (EventQueue &eventQueue, const BehaviorTreeAsset &tree, EntityID entity, AIBlackboard_data &blackboard) |
Definition at line 27 of file BehaviorTree.cpp.
| BTStatus ExecuteBTAction | ( | BTActionType | actionType, |
| float | param1, | ||
| float | param2, | ||
| EntityID | entity, | ||
| AIBlackboard_data & | blackboard | ||
| ) |
Definition at line 636 of file BehaviorTree.cpp.
References AttackIfClose, ChooseRandomNavigablePoint, ClearTarget, Failure, GameEngine::fDt, FollowPath, Gameplay, NavigationMap::Get(), EventQueue::Get(), World::Get(), World::GetComponent(), GetComponentTypeID_Static(), NavigationMap::GetRandomNavigablePoint(), World::HasComponent(), Idle, INVALID_ENTITY_ID, Vector::Magnitude(), MoveToGoal, Message::msg_type, PatrolPickNextPoint, Position_data::position, EventQueue::Push(), RequestPathfinding, Running, SendMessage, SetMoveGoalToLastKnownTargetPos, SetMoveGoalToPatrolPoint, SetMoveGoalToTarget, Success, AttackIntent_data::targetEntity, MoveIntent_data::targetPosition, and WaitRandomTime.
Referenced by ExecuteBTNode().
Here is the call graph for this function:
Here is the caller graph for this function:| BTStatus ExecuteBTCondition | ( | BTConditionType | condType, |
| float | param, | ||
| EntityID | entity, | ||
| const AIBlackboard_data & | blackboard | ||
| ) |
Definition at line 565 of file BehaviorTree.cpp.
References MoveIntent_data::arrivalThreshold, CanAttack, Failure, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), HasMoveGoal, HasNavigableDestination, HasReachedDestination, HasValidPath, HealthBelow, HeardNoise, IsWaitTimerExpired, Vector::Magnitude(), Success, TargetInRange, and TargetVisible.
Referenced by ExecuteBTNode().
Here is the call graph for this function:
Here is the caller graph for this function:| BTStatus ExecuteBTNode | ( | const BTNode & | node, |
| EntityID | entity, | ||
| AIBlackboard_data & | blackboard, | ||
| const BehaviorTreeAsset & | tree | ||
| ) |
Definition at line 450 of file BehaviorTree.cpp.
References Action, Condition, ExecuteBTAction(), ExecuteBTCondition(), ExecuteBTNode(), Failure, GetComponentTypeID_Static(), Inverter, Repeater, Running, Selector, Sequence, and Success.
Referenced by ExecuteBTNode(), BehaviorTreeSystem::Process(), and TickEventRoots().
Here is the call graph for this function:
Here is the caller graph for this function:| void TickEventRoots | ( | EventQueue & | eventQueue, |
| const BehaviorTreeAsset & | tree, | ||
| EntityID | entity, | ||
| AIBlackboard_data & | blackboard | ||
| ) |
Definition at line 1575 of file BehaviorTree.cpp.
References ExecuteBTNode(), GetComponentTypeID_Static(), Olympe_EventType_AI_DamageDealt, Olympe_EventType_AI_Explosion, Olympe_EventType_AI_Noise, Olympe_EventType_Object_Create, and Olympe_EventType_Object_Destroy.
Referenced by BehaviorTreeSystem::Process().
Here is the call graph for this function:
Here is the caller graph for this function: