A class in Root.Township, the global namespace.
Test door for the light puzzle: turns its material green when its condition is complete and red when not. It doesn't move.
Constructors
| Member | What it is |
|---|
PuzzleDoor() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private PuzzleCondition condition | Condition that opens the door. |
Methods
4 private and internal methods
| Member | What it is |
|---|
private void Awake() | Subscribes to the condition and applies its current state. |
private void CloseDoor() | Sets the renderer colour to red. |
private void DoorStateChanged(PuzzleCondition condition) | Opens or closes the door to match the condition, logging each change. |
private void OpenDoor() | Sets the renderer colour to green. |