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

Represents a decision for an NPC to eavesdrop by a window (outside a building). More...

Public Member Functions

 EavesdropDecision (GameObject buildingGO, NPC npc)
 Initializes a new instance of the EavesdropDecision class.
 
- Public Member Functions inherited from VisitBuildingDecision
 VisitBuildingDecision (GameObject buildingGO, NPC npc)
 Initializes a new instance of the VisitBuildingDecision class.
 
bool Tick ()
 Executes the decision logic each frame.
 
void Start ()
 Starts the decision by setting the NPC's destination and stopping distance.
 
void Finish ()
 Finishes the decision and restores the NPC's state if necessary.
 
string DebugInfo ()
 Provides debug information about the decision.
 
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.
 

Protected Member Functions

override void OnFinished ()
 Called when the decision is finished. No state changes by default (you can hook memory/events here if desired).
 
override bool ShouldFinish ()
 Determines whether the decision should finish earlier than the default timer. Return false to rely solely on WaitDuration.
 
abstract void OnFinished ()
 Called when the decision is finished.
 
abstract bool ShouldFinish ()
 Determines whether the decision should finish.
 

Properties

override float StoppingDistance [get]
 Stopping distance for the NPC when approaching the building. Keep it small so the NPC stands close to the wall/window.
 
override bool NpcShouldDisappear [get]
 Whether the NPC should disappear after completing the decision. Eavesdropping happens outside, so the NPC should remain visible.
 
override float WaitDuration [get]
 Duration the NPC should wait at the building while eavesdropping.
 
override string PrettyName [get]
 Human-readable name of the decision (used for the speech bubble / logging).
 
- Properties inherited from VisitBuildingDecision
bool reachedBuilding [get]
 Indicates whether the NPC has reached the building.
 
abstract float WaitDuration [get]
 The duration the NPC should wait after reaching the building.
 
abstract float StoppingDistance [get]
 The stopping distance for the NPC when approaching the building.
 
abstract bool NpcShouldDisappear [get]
 Indicates whether the NPC should disappear upon reaching the building.
 
abstract string PrettyName [get]
 Gets the human-readable name of the decision.
 
- Properties inherited from IDecision
string PrettyName [get]
 Gets the human-readable description of the decision.
 

Additional Inherited Members

- Protected Attributes inherited from VisitBuildingDecision
NPC npc
 The NPC associated with this decision.
 

Detailed Description

Represents a decision for an NPC to eavesdrop by a window (outside a building).

Constructor & Destructor Documentation

◆ EavesdropDecision()

EavesdropDecision.EavesdropDecision ( GameObject  buildingGO,
NPC  npc 
)

Initializes a new instance of the EavesdropDecision class.

Parameters
buildingGOThe GameObject representing the target building (or its Entrance if present).
npcThe NPC making the decision.

Member Function Documentation

◆ OnFinished()

override void EavesdropDecision.OnFinished ( )
protectedvirtual

Called when the decision is finished. No state changes by default (you can hook memory/events here if desired).

Implements VisitBuildingDecision.

◆ ShouldFinish()

override bool EavesdropDecision.ShouldFinish ( )
protectedvirtual

Determines whether the decision should finish earlier than the default timer. Return false to rely solely on WaitDuration.

Returns
False, indicating the decision should not finish prematurely.

Implements VisitBuildingDecision.

Property Documentation

◆ NpcShouldDisappear

override bool EavesdropDecision.NpcShouldDisappear
getprotected

Whether the NPC should disappear after completing the decision. Eavesdropping happens outside, so the NPC should remain visible.

◆ PrettyName

override string EavesdropDecision.PrettyName
get

Human-readable name of the decision (used for the speech bubble / logging).

Implements IDecision.

◆ StoppingDistance

override float EavesdropDecision.StoppingDistance
getprotected

Stopping distance for the NPC when approaching the building. Keep it small so the NPC stands close to the wall/window.

◆ WaitDuration

override float EavesdropDecision.WaitDuration
getprotected

Duration the NPC should wait at the building while eavesdropping.


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