PlaceItemNoDockFirePuzzleLogic
A class in Root.Township, the global namespace.
Puzzle trigger that reports whether a lit fire (such as a torch) is inside it, firing onValidItemChanged. Items don't need to be docked, just placed in the trigger.
- Listed in Global namespace: P
- Inherits or implements
MonoBehaviour,ISavable<PlaceItemNoDockFirePuzzleLogicSaveData>,ISavableSave<PlaceItemNoDockFirePuzzleLogicSaveData>,ISavableSaveBase - Derived types
PlaceItemNoDockFirePuzzleLogicSaveData
Constructors
| Member | What it is |
|---|---|
PlaceItemNoDockFirePuzzleLogic() | Creates a PlaceItemNoDockFirePuzzleLogic with default values. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private PlaceItemNoDockFirePuzzleLogicSaveData config | Saved puzzle options. Saved and loaded but not read by the logic here. |
private List<Fire> firesInCollider | Fires currently inside the trigger. |
private bool hasCorrectItem | True when the last check found a lit fire. |
private BoolUnityEvent onValidItemChanged | Event fired with whether a lit fire is present. |
Methods
| Member | What it is |
|---|---|
void RefreshItemCheck() | Fires onValidItemChanged with true if any tracked fire is lit, otherwise false. |
8 private and internal methods
| Member | What it is |
|---|---|
private void DestroyedEventRemove(NetworkEntity entity, bool isUnload) | Stops tracking a pickup and its fire when its entity is destroyed, then rechecks. |
private void DockedEventRemove(Interactor arg1, Pickup arg2, PickupDock arg3) | Stops tracking a pickup and its fire when it docks somewhere, then rechecks. |
private void FireSub(Pickup pickup) | Hooks the fire's ToggleEvent on a pickup so lighting or putting it out rechecks the puzzle. |
private void FireToggle(bool obj) | Rechecks the puzzle when a tracked fire is lit or put out. |
private void OnTriggerEnter(Collider other) | Starts tracking a pickup and any fire that enters, then rechecks. |
private void OnTriggerExit(Collider other) | Stops tracking a pickup and its fire when it leaves, then rechecks. |
private void RemoveFromFireList(Fire fire) | Unhooks a fire and removes it from firesInCollider. |
private void UnsubFromPickupEvents(Pickup pickup) | Unhooks a pickup's docked and destroyed events. |