Class CoreBehaviour
A base class for objects that can be enabled or disabled, and integrate with core loading callbacks for initialization or cleanup.
Implements
Namespace: AlchemyBow.Core.Extras.Behaviours
Assembly: AlchemyBow.Core.dll
Syntax
public class CoreBehaviour : ICoreLoadingCallbacksHandler
Constructors
CoreBehaviour(CoreBehaviourEnablingStrategy)
Creates a new instance of the CoreBehaviour class.
Declaration
protected CoreBehaviour(CoreBehaviourEnablingStrategy enablingStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| CoreBehaviourEnablingStrategy | enablingStrategy | The strategy for enabling and disabling the |
Properties
Enabled
Gets or sets a value indicating whether the CoreBehaviour is enabled.
Behaves according to the strategy and invokes OnEnabled and OnDisabled when the value changes.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
OnCoreLoadingFinished()
Called when the core loading is finished.
Declaration
protected virtual void OnCoreLoadingFinished()
Remarks
Requires the CoreBehaviour to be added to the dynamic list of core loading callbacks handlers.
OnCoreSceneChangeStarted()
Called when the core scene change is started.
Declaration
protected virtual void OnCoreSceneChangeStarted()
Remarks
Requires the CoreBehaviour to be added to the dynamic list of core loading callbacks handlers.
OnDisabled()
Called when the CoreBehaviour is disabled.
Declaration
protected virtual void OnDisabled()
OnEnabled()
Called when the CoreBehaviour is enabled.
Declaration
protected virtual void OnEnabled()