Add scene transitions (fade, wipe) to SceneManager
Switch(scene, transition) covers the old scene, swaps at full coverage (hiding slow OnLoad), then reveals the new one. Built-in Fade and Wipe transitions draw through TransitionRenderer (BasicEffect quad, no SpriteBatch); custom transitions subclass Transition. Runs on unscaled time so it works while gameplay is paused; Switch during a transition replaces the pending target. Sample: Tab now fades into the stress scene and wipes back. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ff2231a8ab
commit
2b7d4c4fef
@@ -93,7 +93,7 @@ public sealed class MainScene : Scene
|
||||
UpdateSystems.Add(new PlayerControlSystem(player, actions, audio, beep));
|
||||
UpdateSystems.Add(new BounceSystem(WorldBounds));
|
||||
UpdateSystems.Add(new CameraControlSystem(camera, player, input));
|
||||
UpdateSystems.Add(new SceneHotkeysSystem(Context, actions, () => new StressScene()));
|
||||
UpdateSystems.Add(new SceneHotkeysSystem(Context, actions, () => new StressScene(), Transition.Fade(0.8f)));
|
||||
UpdateSystems.Add(new TitleStatsSystem(Context, renderer, "Main"));
|
||||
|
||||
var music = audio.Music;
|
||||
|
||||
Reference in New Issue
Block a user