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

Represents a decision for an NPC to read public announcements on the town notice board. More...

Public Member Functions

 ReadNoticeBoardDecision (GameObject buildingGO, NPC npc)
 Initializes a new instance of the ReadNoticeBoardDecision 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 finishes (after waiting near the notice board).
 
override bool ShouldFinish ()
 Determines whether the decision should finish prematurely. Returns false to rely on the WaitDuration.
 
abstract void OnFinished ()
 Called when the decision is finished.
 
abstract bool ShouldFinish ()
 Determines whether the decision should finish.
 

Properties

override float StoppingDistance [get]
 The stopping distance for the NPC when approaching the notice board.
 
override bool NpcShouldDisappear [get]
 Whether the NPC should disappear after reaching the target. Reading the board happens in public, so keep the NPC visible.
 
override float WaitDuration [get]
 Duration of time the NPC spends reading announcements.
 
override string PrettyName [get]
 Human-readable name used for speech bubbles and logs.
 
- 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 read public announcements on the town notice board.

Constructor & Destructor Documentation

◆ ReadNoticeBoardDecision()

ReadNoticeBoardDecision.ReadNoticeBoardDecision ( GameObject  buildingGO,
NPC  npc 
)

Initializes a new instance of the ReadNoticeBoardDecision class.

Parameters
buildingGOThe GameObject representing the town notice board.
npcThe NPC performing the decision.

Member Function Documentation

◆ OnFinished()

override void ReadNoticeBoardDecision.OnFinished ( )
protectedvirtual

Called when the decision finishes (after waiting near the notice board).

Implements VisitBuildingDecision.

◆ ShouldFinish()

override bool ReadNoticeBoardDecision.ShouldFinish ( )
protectedvirtual

Determines whether the decision should finish prematurely. Returns false to rely on the WaitDuration.

Returns
False — decision completes only after the duration ends.

Implements VisitBuildingDecision.

Property Documentation

◆ NpcShouldDisappear

override bool ReadNoticeBoardDecision.NpcShouldDisappear
getprotected

Whether the NPC should disappear after reaching the target. Reading the board happens in public, so keep the NPC visible.

◆ PrettyName

override string ReadNoticeBoardDecision.PrettyName
get

Human-readable name used for speech bubbles and logs.

Implements IDecision.

◆ StoppingDistance

override float ReadNoticeBoardDecision.StoppingDistance
getprotected

The stopping distance for the NPC when approaching the notice board.

◆ WaitDuration

override float ReadNoticeBoardDecision.WaitDuration
getprotected

Duration of time the NPC spends reading announcements.


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