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

Represents a decision for an NPC to idle for a specified duration. More...

Public Member Functions

string DebugInfo ()
 Provides debug information about the remaining idle time.
 
 IdleDecision (float idleTime)
 Initializes a new instance of the IdleDecision class with a specified idle time.
 
 IdleDecision ()
 Initializes a new instance of the IdleDecision class with a random idle time.
 
void Start ()
 Starts the idle decision by recording the current time.
 
void Finish ()
 Called when the decision finishes. Currently, no implementation is provided.
 
bool Tick ()
 Updates the idle decision and checks if the idle time has elapsed.
 
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.
 

Static Public Attributes

static readonly List< string > RandomIdleNames
 A list of random idle names for descriptive purposes.
 

Properties

static string RandomPrettyName [get]
 Gets a random idle name from the list of idle names.
 
string PrettyName [get]
 Human-readable name of the decision.
 
- Properties inherited from IDecision
string PrettyName [get]
 Gets the human-readable description of the decision.
 

Detailed Description

Represents a decision for an NPC to idle for a specified duration.

Constructor & Destructor Documentation

◆ IdleDecision() [1/2]

IdleDecision.IdleDecision ( float  idleTime)

Initializes a new instance of the IdleDecision class with a specified idle time.

Parameters
idleTimeThe duration of the idling in seconds.

◆ IdleDecision() [2/2]

IdleDecision.IdleDecision ( )

Initializes a new instance of the IdleDecision class with a random idle time.

Member Function Documentation

◆ DebugInfo()

string IdleDecision.DebugInfo ( )

Provides debug information about the remaining idle time.

Returns
A string containing the remaining idle time.

Implements IDecision.

◆ Finish()

void IdleDecision.Finish ( )

Called when the decision finishes. Currently, no implementation is provided.

Implements IDecision.

◆ Start()

void IdleDecision.Start ( )

Starts the idle decision by recording the current time.

Implements IDecision.

◆ Tick()

bool IdleDecision.Tick ( )

Updates the idle decision and checks if the idle time has elapsed.

Returns
true if the NPC should continue idling; otherwise, false.

Implements IDecision.

Member Data Documentation

◆ RandomIdleNames

readonly List<string> IdleDecision.RandomIdleNames
static
Initial value:
= new List<string>()
{
"hanging around",
}

A list of random idle names for descriptive purposes.

Property Documentation

◆ PrettyName

string IdleDecision.PrettyName
get

Human-readable name of the decision.

Implements IDecision.

◆ RandomPrettyName

string IdleDecision.RandomPrettyName
staticget

Gets a random idle name from the list of idle names.


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