Skip to main content

Phase

A class in Root.Township, the global namespace.

One stage of a phased sequence, driven through the IPhase interface and wired to logic bool senders and a receiver.

Constructors​

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

Fields​

MemberWhat it is
string detailsDesigner notes about the phase.
3 private and internal fields
MemberWhat it is
private LogicBoolSender activeLogic output that is on while the phase is running.
private LogicBoolSender completeLogic output that turns on when the phase is completed.
private LogicBoolReceiver markCompleteLogic input that marks the phase as done.

Properties​

MemberWhat it is
bool IsMarkedComplete { get; }True while the markComplete logic input is on.

Events​

MemberWhat it is
event UnityAction MarkedCompletedFires when the markComplete logic input turns on.

Methods​

3 private and internal methods
MemberWhat it is
private void IPhase.Begin()Turns the active logic output on.
private void IPhase.Complete()Turns active off and the complete output on.
private void IPhase.ResetState()Turns both the active and complete outputs off.

Used in​

Members of other types that take, return or hold a Phase: