NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::BTScriptController Class Referenceabstract

#include <BTScriptBridge.h>

Inheritance diagram for NoJob::BTScriptController:
NoJob::ScriptableEntity NoJob::BTAssetAgent NoJob::BTExampleMover

Public Member Functions

void OnCreate () final
 Called when the runtime script instance is created.
void OnUpdate (float deltaTime) final
 Called during scene updates.
void OnDestroy () final
 Called before the runtime script instance is destroyed.
const BTDebugSnapshot & GetDebugSnapshot () const noexcept
BTInstance * GetBehaviorTreeInstance () noexcept
const BTInstance * GetBehaviorTreeInstance () const noexcept
BTStatus GetLastBehaviorTreeStatus () const noexcept
Public Member Functions inherited from NoJob::ScriptableEntity
virtual ~ScriptableEntity ()=default
virtual bool GetNeuralDebugSnapshot (NeuralAgent::Snapshot &out) const
 Provides live neural diagnostics across project DLL boundaries.
virtual void RegisterBehaviorTreeBindings (BTNativeRegistry &) const
const std::string & GetAIDebugState () const
const std::string & GetAIDebugPreviousState () const
float GetAIDebugTimeInState () const
float GetAIDebugRuntimeSeconds () const
const std::vector< AIStateTransition > & GetAIDebugTransitions () const
template<typename T>
T & GetComponent ()
template<typename T>
bool HasComponent () const
Entity GetEntity () const

Protected Member Functions

virtual std::shared_ptr< const BTTree > CreateTree ()=0
virtual void OnTreeStarted (BTContext &)
virtual void OnTreeStopped (BTContext &)
Protected Member Functions inherited from NoJob::ScriptableEntity
void TickAIDebug (float dt)
void SetAIDebugState (const char *state)
NativeScriptComponent & ScriptComponent ()
float GetFloat (const std::string &name, float fallback=0.0f) const
int GetInt (const std::string &name, int fallback=0) const
bool GetBool (const std::string &name, bool fallback=false) const
glm::vec3 GetVec3 (const std::string &name, glm::vec3 fallback={}) const

Detailed Description

Definition at line 66 of file BTScriptBridge.h.

Member Function Documentation

◆ CreateTree()

virtual std::shared_ptr< const BTTree > NoJob::BTScriptController::CreateTree ( )
protectedpure virtual

Implemented in NoJob::BTAssetAgent, and NoJob::BTExampleMover.

Referenced by OnCreate().

◆ GetBehaviorTreeInstance() [1/2]

const BTInstance * NoJob::BTScriptController::GetBehaviorTreeInstance ( ) const
inlinenoexcept

Definition at line 105 of file BTScriptBridge.h.

◆ GetBehaviorTreeInstance() [2/2]

BTInstance * NoJob::BTScriptController::GetBehaviorTreeInstance ( )
inlinenoexcept

Definition at line 104 of file BTScriptBridge.h.

◆ GetDebugSnapshot()

const BTDebugSnapshot & NoJob::BTScriptController::GetDebugSnapshot ( ) const
inlinenoexcept

Definition at line 102 of file BTScriptBridge.h.

◆ GetLastBehaviorTreeStatus()

BTStatus NoJob::BTScriptController::GetLastBehaviorTreeStatus ( ) const
inlinenoexcept

Definition at line 106 of file BTScriptBridge.h.

◆ OnCreate()

void NoJob::BTScriptController::OnCreate ( )
inlinefinalvirtual

Called when the runtime script instance is created.

Reimplemented from NoJob::ScriptableEntity.

Definition at line 68 of file BTScriptBridge.h.

References CreateTree(), and OnTreeStarted().

◆ OnDestroy()

void NoJob::BTScriptController::OnDestroy ( )
inlinefinalvirtual

Called before the runtime script instance is destroyed.

Reimplemented from NoJob::ScriptableEntity.

Definition at line 89 of file BTScriptBridge.h.

References OnTreeStopped().

◆ OnTreeStarted()

virtual void NoJob::BTScriptController::OnTreeStarted ( BTContext & )
inlineprotectedvirtual

Reimplemented in NoJob::BTAssetAgent.

Definition at line 110 of file BTScriptBridge.h.

Referenced by OnCreate().

◆ OnTreeStopped()

virtual void NoJob::BTScriptController::OnTreeStopped ( BTContext & )
inlineprotectedvirtual

Reimplemented in NoJob::BTAssetAgent.

Definition at line 111 of file BTScriptBridge.h.

Referenced by OnDestroy().

◆ OnUpdate()

void NoJob::BTScriptController::OnUpdate ( float deltaTime)
inlinefinalvirtual

Called during scene updates.

Parameters
deltaTimeFrame time in seconds.

Reimplemented from NoJob::ScriptableEntity.

Definition at line 82 of file BTScriptBridge.h.


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