NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::BTService Class Referencefinal

#include <BTService.h>

Inheritance diagram for NoJob::BTService:
NoJob::BTNode

Public Member Functions

 BTService (BTNodeID id, std::shared_ptr< const BTNativeRegistry > registry, std::string action, float interval, std::unique_ptr< BTNode > child)
std::string DebugLabel () const override
BTStatus Tick (BTContext &ctx, float dt) const override
 Evaluates this node for one update.
void Reset (BTContext &ctx) const override
void CollectChildren (std::vector< const BTNode * > &out) const override
Public Member Functions inherited from NoJob::BTNode
 BTNode (BTNodeID id)
virtual ~BTNode ()=default
 BTNode (const BTNode &)=delete
BTNode & operator= (const BTNode &)=delete
BTNodeID GetID () const

Detailed Description

Definition at line 13 of file BTService.h.

Constructor & Destructor Documentation

◆ BTService()

NoJob::BTService::BTService ( BTNodeID id,
std::shared_ptr< const BTNativeRegistry > registry,
std::string action,
float interval,
std::unique_ptr< BTNode > child )
inline

Definition at line 15 of file BTService.h.

References NoJob::BTNode::BTNode().

Member Function Documentation

◆ CollectChildren()

void NoJob::BTService::CollectChildren ( std::vector< const BTNode * > & out) const
inlineoverridevirtual

Reimplemented from NoJob::BTNode.

Definition at line 42 of file BTService.h.

◆ DebugLabel()

std::string NoJob::BTService::DebugLabel ( ) const
inlineoverridevirtual

Reimplemented from NoJob::BTNode.

Definition at line 22 of file BTService.h.

◆ Reset()

void NoJob::BTService::Reset ( BTContext & ctx) const
inlineoverridevirtual

Reimplemented from NoJob::BTNode.

Definition at line 37 of file BTService.h.

References NoJob::BTContext::Blackboard(), NoJob::BTBlackboard::Remove(), and NoJob::BTNode::Reset().

Referenced by Tick().

◆ Tick()

BTStatus NoJob::BTService::Tick ( BTContext & context,
float deltaTime ) const
inlineoverridevirtual

Evaluates this node for one update.

Parameters
contextPer-agent execution context.
deltaTimeTime elapsed since the previous tick.
Returns
Success, Failure or Running.

Implements NoJob::BTNode.

Definition at line 23 of file BTService.h.

References NoJob::BTContext::Blackboard(), NoJob::BTNode::GetID(), NoJob::BTContext::GetNodeState(), NoJob::BTBlackboard::GetOr(), NoJob::BTContext::RecordStatus(), Reset(), NoJob::Running, and NoJob::BTBlackboard::Set().


The documentation for this class was generated from the following file: