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
| Member | What it is |
|---|
PendingRepairBoxCompletionCondition() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private bool isSetup | Whether Setup has run. |
private Action onConditionChanged | Backing field for OnConditionChanged. |
private RepairBox repairBox | The repair box this condition watches. |
Properties
| Member | What it is |
|---|
Action OnConditionChanged { get; set; } | Change callback. The first read hooks the repair box's OnRepaired event. |
Methods
| Member | What it is |
|---|
bool IsConditionMet() | True while the repair box is not done. |
2 private and internal methods
| Member | What 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. |