![]() |
Raymond Maarloeve
|
Represents a decision for an NPC to visit a building. Handles navigation, waiting, and optional disappearance behavior. More...
Public Member Functions | |
| 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 | |
| abstract void | OnFinished () |
| Called when the decision is finished. | |
| abstract bool | ShouldFinish () |
| Determines whether the decision should finish. | |
Protected Attributes | |
| NPC | npc |
| The NPC associated with this decision. | |
Properties | |
| 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. | |
Represents a decision for an NPC to visit a building. Handles navigation, waiting, and optional disappearance behavior.
| VisitBuildingDecision.VisitBuildingDecision | ( | GameObject | buildingGO, |
| NPC | npc | ||
| ) |
Initializes a new instance of the VisitBuildingDecision class.
| buildingGO | The building GameObject. |
| npc | The NPC making the decision. |
| string VisitBuildingDecision.DebugInfo | ( | ) |
Provides debug information about the decision.
Implements IDecision.
| void VisitBuildingDecision.Finish | ( | ) |
|
protectedpure virtual |
Called when the decision is finished.
Implemented in BlacksmithWorkDecision, BuryingSomethingDecision, CheckingForFollowersDecision, ChopWoodDecision, CookStewDecision, CountingCoinsDecision, DiceGameDecision, DrunkenRuckusDecision, EavesdropDecision, FetchFirewoodDecision, GetAleDecision, GetWaterDecision, GossipAtWellDecision, GoToSleepDecision, HideObjectDecision, LeavingStrangeMarkingsDecision, MendingClothesDecision, MourningDecision, OfferingSacrificeDecision, PaganPrayDecision, PerformingRitualDecision, PrayDecision, ReadBibleDecision, ReadNoticeBoardDecision, RepairRoofDecision, SingingDrunkDecision, SobbingQuietlyDecision, SweepYardDecision, TendGardenDecision, WarmHandsDecision, and WatchingFromShadowsDecision.
|
protectedpure virtual |
Determines whether the decision should finish.
Implemented in BlacksmithWorkDecision, BuryingSomethingDecision, CheckingForFollowersDecision, ChopWoodDecision, CookStewDecision, CountingCoinsDecision, DiceGameDecision, DrunkenRuckusDecision, EavesdropDecision, FetchFirewoodDecision, GetAleDecision, GetWaterDecision, GossipAtWellDecision, GoToSleepDecision, HideObjectDecision, LeavingStrangeMarkingsDecision, MendingClothesDecision, MourningDecision, OfferingSacrificeDecision, PaganPrayDecision, PerformingRitualDecision, PrayDecision, ReadBibleDecision, ReadNoticeBoardDecision, RepairRoofDecision, SingingDrunkDecision, SobbingQuietlyDecision, SweepYardDecision, TendGardenDecision, WarmHandsDecision, and WatchingFromShadowsDecision.
| void VisitBuildingDecision.Start | ( | ) |
| bool VisitBuildingDecision.Tick | ( | ) |
Executes the decision logic each frame.
Implements IDecision.
|
getprotected |
Indicates whether the NPC should disappear upon reaching the building.
|
get |
Gets the human-readable name of the decision.
Implements IDecision.
|
get |
Indicates whether the NPC has reached the building.
|
getprotected |
The stopping distance for the NPC when approaching the building.
|
getprotected |
The duration the NPC should wait after reaching the building.