WhenActivated
: UnityEvent
[Get] |
The Unity event that is triggered during an Update when the provided IActiveState becomes active.
Signature
UnityEvent WhenActivated |
WhenDeactivated
: UnityEvent
[Get] |
The Unity event that is triggered during an Update when the provided IActiveState becomes inactive.
Signature
UnityEvent WhenDeactivated |
Awake
()
|
Signature
virtual void Awake() Returns void |
Start
()
|
Signature
virtual void Start() Returns void |
Update
()
|
This update method monitors the active state and triggers the appropriate Unity event based on the current state.
Signature
virtual void Update() Returns void |
InjectActiveState
(
activeState
)
|
Sets the active state for the wrapper.
This method is designed to support dependency injection for unit testing.
Signature
void InjectActiveState(IActiveState activeState) Parameters Returns void |
InjectAllActiveStateUnityEventWrapper
(
activeState
)
|
Injects an active state that this ActiveStateUnityEventWrapper will monitor.
This method is used to set up the wrapper with the active state whose changes will trigger the associated Unity events.
Signature
void InjectAllActiveStateUnityEventWrapper(IActiveState activeState) Parameters Returns void |
InjectOptionalEmitOnFirstUpdate
(
emitOnFirstUpdate
)
|
Optionally sets whether to emit events on the first update.
Signature
void InjectOptionalEmitOnFirstUpdate(bool emitOnFirstUpdate) Parameters emitOnFirstUpdate: bool
If true, events will be emitted on the first update.
Returns void |
InjectOptionalWhenActivated
(
whenActivated
)
|
Injects a Unity event that is triggered when the active state is activated.
Signature
void InjectOptionalWhenActivated(UnityEvent whenActivated) Parameters whenActivated: UnityEvent
The Unity event to trigger on activation.
Returns void |
InjectOptionalWhenDeactivated
(
whenDeactivated
)
|
Injects a Unity event that is triggered when the active state is deactivated.
Signature
void InjectOptionalWhenDeactivated(UnityEvent whenDeactivated) Parameters whenDeactivated: UnityEvent
The Unity event to trigger on deactivation.
Returns void |