Interface ISceneCommandHandler
Receives PGPSCN command-action side effects that are runtime-only
(scene transitions and sound playback). The runtime Game
passes its SceneManager.ChangeScene / SoundPlayer.PlaySound
here; the editor's SceneBridge passes no-op or logging stubs so the
viewport never accidentally transitions away from the scene being
previewed or pipes audio through the editor process.
Namespace: PopcorningGuineaPig.Engine.Scenes
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public interface ISceneCommandHandler
Methods
| Edit this page View SourceOnPlaySound(string, float)
Invoked when a PGPSCN play_sound fires. Implementations decide whether to route to the audio engine (runtime) or drop the call (editor).
Declaration
void OnPlaySound(string assetId, float volume)
Parameters
| Type | Name | Description |
|---|---|---|
| string | assetId | |
| float | volume |
OnSceneTransition(Scene)
Invoked when a PGPSCN scene_transition fires after the target scene has been resolved via SceneTypeRegistry. Implementations decide whether to honor the transition (runtime) or ignore it (editor).
Declaration
void OnSceneTransition(Scene targetScene)
Parameters
| Type | Name | Description |
|---|---|---|
| Scene | targetScene |