Skip to main content

PendingRepairBoxCompletionCondition

A class in Root.Township, Features.Gameplay.GameConditions.

IGameCondition that is met while a RepairBox is still not repaired, and fires its change callback when the box is repaired.

Constructors​

MemberWhat it is
PendingRepairBoxCompletionCondition()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private bool isSetupWhether Setup has run.
private Action onConditionChangedBacking field for OnConditionChanged.
private RepairBox repairBoxThe repair box this condition watches.

Properties​

MemberWhat it is
Action OnConditionChanged { get; set; }Change callback. The first read hooks the repair box's OnRepaired event.

Methods​

MemberWhat it is
bool IsConditionMet()True while the repair box is not done.
2 private and internal methods
MemberWhat it is
private void RepairBoxCompleted()Runs the change callback when the box is repaired.
private void Setup()Hooks the box's OnRepaired event, done lazily on the first OnConditionChanged read.