NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::BTContext Class Reference

#include <BTContext.h>

Classes

struct  Event

Public Member Functions

void BeginTick ()
void Emit (BTNodeID node, std::string kind, std::string detail={})
const std::deque< Event > & Events () const
const std::unordered_map< BTNodeID, int > & CurrentStatuses () const
std::uint64_t CurrentTick () const
BTNodeRuntimeState & GetNodeState (BTNodeID id)
const BTNodeRuntimeState * FindNodeState (BTNodeID id) const
void ResetNodeState (BTNodeID id)
void BindScript (ScriptableEntity *script) noexcept
ScriptableEntity * GetScript () const noexcept
void UnbindScript () noexcept
BTNodeID ActiveNode () const noexcept
void SetActiveNode (BTNodeID id) noexcept
void SetCancellation (BTNodeID id, std::function< void(BTContext &)> fn)
void CancelNode (BTNodeID id)
void CancelAll ()
void RequestReevaluation ()
bool ConsumeReevaluation () noexcept
void RecordStatus (BTNodeID id, int status)
const std::unordered_map< BTNodeID, int > & LastStatuses () const
const std::unordered_map< BTNodeID, std::size_t > & TickCounters () const
void Reset ()
BTBlackboard & Blackboard ()
const BTBlackboard & Blackboard () const
void ResetAll ()

Detailed Description

Definition at line 24 of file BTContext.h.

Member Function Documentation

◆ ActiveNode()

BTNodeID NoJob::BTContext::ActiveNode ( ) const
inlinenoexcept

◆ BeginTick()

void NoJob::BTContext::BeginTick ( )
inline

Definition at line 32 of file BTContext.h.

◆ BindScript()

void NoJob::BTContext::BindScript ( ScriptableEntity * script)
inlinenoexcept

Definition at line 52 of file BTContext.h.

◆ Blackboard() [1/2]

◆ Blackboard() [2/2]

const BTBlackboard & NoJob::BTContext::Blackboard ( ) const
inline

Definition at line 91 of file BTContext.h.

◆ CancelAll()

void NoJob::BTContext::CancelAll ( )
inline

Definition at line 72 of file BTContext.h.

References CancelNode().

Referenced by Reset().

◆ CancelNode()

void NoJob::BTContext::CancelNode ( BTNodeID id)
inline

Definition at line 62 of file BTContext.h.

References Emit().

Referenced by CancelAll(), NoJob::BTNode::Reset(), and NoJob::BTActionNode::Tick().

◆ ConsumeReevaluation()

bool NoJob::BTContext::ConsumeReevaluation ( )
inlinenoexcept

Definition at line 76 of file BTContext.h.

Referenced by NoJob::BTSelector::Tick().

◆ CurrentStatuses()

const std::unordered_map< BTNodeID, int > & NoJob::BTContext::CurrentStatuses ( ) const
inline

Definition at line 41 of file BTContext.h.

◆ CurrentTick()

std::uint64_t NoJob::BTContext::CurrentTick ( ) const
inline

Definition at line 42 of file BTContext.h.

◆ Emit()

void NoJob::BTContext::Emit ( BTNodeID node,
std::string kind,
std::string detail = {} )
inline

◆ Events()

const std::deque< Event > & NoJob::BTContext::Events ( ) const
inline

Definition at line 40 of file BTContext.h.

◆ FindNodeState()

const BTNodeRuntimeState * NoJob::BTContext::FindNodeState ( BTNodeID id) const
inline

Definition at line 45 of file BTContext.h.

Referenced by NoJob::BTDecorator::Reset().

◆ GetNodeState()

◆ GetScript()

ScriptableEntity * NoJob::BTContext::GetScript ( ) const
inlinenoexcept

Definition at line 53 of file BTContext.h.

◆ LastStatuses()

const std::unordered_map< BTNodeID, int > & NoJob::BTContext::LastStatuses ( ) const
inline

Definition at line 85 of file BTContext.h.

◆ RecordStatus()

void NoJob::BTContext::RecordStatus ( BTNodeID id,
int status )
inline

◆ RequestReevaluation()

void NoJob::BTContext::RequestReevaluation ( )
inline

Definition at line 75 of file BTContext.h.

References Emit().

Referenced by NoJob::BTDecorator::Tick().

◆ Reset()

void NoJob::BTContext::Reset ( )
inline

Definition at line 89 of file BTContext.h.

References CancelAll().

Referenced by ResetAll().

◆ ResetAll()

void NoJob::BTContext::ResetAll ( )
inline

Definition at line 94 of file BTContext.h.

References Reset().

◆ ResetNodeState()

void NoJob::BTContext::ResetNodeState ( BTNodeID id)
inline

Definition at line 49 of file BTContext.h.

Referenced by NoJob::BTNode::Reset().

◆ SetActiveNode()

void NoJob::BTContext::SetActiveNode ( BTNodeID id)
inlinenoexcept

Definition at line 58 of file BTContext.h.

Referenced by NoJob::BTActionNode::Tick().

◆ SetCancellation()

void NoJob::BTContext::SetCancellation ( BTNodeID id,
std::function< void(BTContext &)> fn )
inline

Definition at line 59 of file BTContext.h.

Referenced by NoJob::CreateBTGameplayRegistry(), and NoJob::BTAssetAgent::CreateTree().

◆ TickCounters()

const std::unordered_map< BTNodeID, std::size_t > & NoJob::BTContext::TickCounters ( ) const
inline

Definition at line 86 of file BTContext.h.

◆ UnbindScript()

void NoJob::BTContext::UnbindScript ( )
inlinenoexcept

Definition at line 54 of file BTContext.h.


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