Interface IScene
- Namespace
- Gloam.Core.Interfaces
- Assembly
- Gloam.Core.dll
Interface for game scenes that manage their own set of layer renderers
public interface IScene
Properties
IsActive
Gets whether this scene is currently active
bool IsActive { get; }
Property Value
Layers
Gets the layer renderers that belong to this scene
IReadOnlyList<ILayerRenderer> Layers { get; }
Property Value
Name
Gets the unique name of this scene
string Name { get; }
Property Value
Methods
OnActivateAsync(CancellationToken)
Called when the scene becomes active
ValueTask OnActivateAsync(CancellationToken ct = default)
Parameters
ct
CancellationTokenCancellation token
Returns
- ValueTask
A ValueTask representing the activation operation
OnDeactivateAsync(CancellationToken)
Called when the scene becomes inactive
ValueTask OnDeactivateAsync(CancellationToken ct = default)
Parameters
ct
CancellationTokenCancellation token
Returns
- ValueTask
A ValueTask representing the deactivation operation
UpdateAsync(CancellationToken)
Called every frame while the scene is active
ValueTask UpdateAsync(CancellationToken ct = default)
Parameters
ct
CancellationTokenCancellation token
Returns
- ValueTask
A ValueTask representing the update operation