Raymond Maarloeve
Loading...
Searching...
No Matches
WalkDecision Class Reference

Represents a decision for an NPC to walk to a random destination within a specified radius. More...

Public Member Functions

string DebugInfo ()
 Gets debug information about the current destination.
 
 WalkDecision (NPC npc)
 Initializes a new instance of the WalkDecision class.
 
void Start ()
 Starts the walking decision by setting the NPC's NavMeshAgent destination.
 
void Finish ()
 Finishes the walking decision by resetting the NPC's NavMeshAgent path.
 
bool Tick ()
 Updates the decision logic. Checks if the NPC has reached its destination.
 
void Start ()
 Initializes the decision action. Implementation should begin execution of the decision logic.
 
void Finish ()
 Finalizes the decision action. Implementation should clean up any resources or state related to the decision.
 
bool Tick ()
 Executes the decision logic and determines the outcome.
 
string DebugInfo ()
 Provides debugging information for the decision.
 

Public Attributes

float wanderRadius = 20f
 The radius within which the NPC will wander.
 

Properties

string PrettyName [get]
 Gets the pretty name of the decision for LLM inference purposes.
 
- Properties inherited from IDecision
string PrettyName [get]
 Gets the human-readable description of the decision.
 

Detailed Description

Represents a decision for an NPC to walk to a random destination within a specified radius.

Constructor & Destructor Documentation

◆ WalkDecision()

WalkDecision.WalkDecision ( NPC  npc)

Initializes a new instance of the WalkDecision class.

Parameters
npcThe associated with this decision.

Member Function Documentation

◆ DebugInfo()

string WalkDecision.DebugInfo ( )

Gets debug information about the current destination.

Returns
A string containing the current destination.

Implements IDecision.

◆ Finish()

void WalkDecision.Finish ( )

Finishes the walking decision by resetting the NPC's NavMeshAgent path.

Implements IDecision.

◆ Start()

void WalkDecision.Start ( )

Starts the walking decision by setting the NPC's NavMeshAgent destination.

Implements IDecision.

◆ Tick()

bool WalkDecision.Tick ( )

Updates the decision logic. Checks if the NPC has reached its destination.

Returns
False if the walk is finished; otherwise, true.

Implements IDecision.

Member Data Documentation

◆ wanderRadius

float WalkDecision.wanderRadius = 20f

The radius within which the NPC will wander.

Property Documentation

◆ PrettyName

string WalkDecision.PrettyName
get

Gets the pretty name of the decision for LLM inference purposes.

Implements IDecision.


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