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:
Leonid Pershin
2026-06-11 04:27:54 +03:00
co-authored by Claude Fable 5
parent ff2231a8ab
commit 2b7d4c4fef
8 changed files with 338 additions and 15 deletions
+1 -1
View File
@@ -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;