Represents a decision for an NPC to fetch firewood from a nearby woodpile or forest area.
More...
|
| | FetchFirewoodDecision (GameObject buildingGO, NPC npc) |
| | Initializes a new instance of the FetchFirewoodDecision class.
|
| |
| | 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.
|
| |
|
| override void | OnFinished () |
| | Called when the decision finishes (after waiting). You can trigger a memory event or adjust a resource variable here.
|
| |
| override bool | ShouldFinish () |
| | Determines whether the decision should end prematurely. Returns false so the NPC always waits the full duration.
|
| |
| abstract void | OnFinished () |
| | Called when the decision is finished.
|
| |
| abstract bool | ShouldFinish () |
| | Determines whether the decision should finish.
|
| |
|
| override float | StoppingDistance [get] |
| | The stopping distance for the NPC when approaching the target location. A small value so the NPC stands near the woodpile or tree line.
|
| |
| override bool | NpcShouldDisappear [get] |
| | Whether the NPC should disappear after reaching the target. Fetching firewood happens outside, so the NPC remains visible.
|
| |
| override float | WaitDuration [get] |
| | How long the NPC should remain at the target location while fetching wood.
|
| |
| override string | PrettyName [get] |
| | Human-readable name of the decision (used for UI bubbles or logs).
|
| |
| 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.
|
| |
| string | PrettyName [get] |
| | Gets the human-readable description of the decision.
|
| |
|
| NPC | npc |
| | The NPC associated with this decision.
|
| |
Represents a decision for an NPC to fetch firewood from a nearby woodpile or forest area.
◆ FetchFirewoodDecision()
| FetchFirewoodDecision.FetchFirewoodDecision |
( |
GameObject |
buildingGO, |
|
|
NPC |
npc |
|
) |
| |
Initializes a new instance of the FetchFirewoodDecision class.
- Parameters
-
| buildingGO | The GameObject representing the target location (e.g. woodpile, forest edge). |
| npc | The NPC performing the decision. |
◆ OnFinished()
| override void FetchFirewoodDecision.OnFinished |
( |
| ) |
|
|
protectedvirtual |
Called when the decision finishes (after waiting). You can trigger a memory event or adjust a resource variable here.
Implements VisitBuildingDecision.
◆ ShouldFinish()
| override bool FetchFirewoodDecision.ShouldFinish |
( |
| ) |
|
|
protectedvirtual |
Determines whether the decision should end prematurely. Returns false so the NPC always waits the full duration.
- Returns
- False — decision lasts until WaitDuration elapses.
Implements VisitBuildingDecision.
◆ NpcShouldDisappear
| override bool FetchFirewoodDecision.NpcShouldDisappear |
|
getprotected |
Whether the NPC should disappear after reaching the target. Fetching firewood happens outside, so the NPC remains visible.
◆ PrettyName
| override string FetchFirewoodDecision.PrettyName |
|
get |
Human-readable name of the decision (used for UI bubbles or logs).
Implements IDecision.
◆ StoppingDistance
| override float FetchFirewoodDecision.StoppingDistance |
|
getprotected |
The stopping distance for the NPC when approaching the target location. A small value so the NPC stands near the woodpile or tree line.
◆ WaitDuration
| override float FetchFirewoodDecision.WaitDuration |
|
getprotected |
How long the NPC should remain at the target location while fetching wood.
The documentation for this class was generated from the following file: