Skip to main content

phaser-scene-navigation

Standardized patterns for Phaser scene transitions, navigation testing, and scene lifecycle management. Use when testing scene transitions, navigating between game scenes, or when scene navigation discovery issues occur. Documents scene transition methods, wait patterns, and console log fallback verification.

Jump to install

Source facts

Repository
pmarashian/cursor-agent-skills
Last source activity
February 13, 2026 at 19:51
Detected SKILL.md language
English
Stars
2
Forks
1

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
3 files

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
phaser-scene-navigation
description
Standardized patterns for Phaser scene transitions, navigation testing, and scene lifecycle management. Use when testing scene transitions, navigating between game scenes, or when scene navigation discovery issues occur. Documents scene transition methods, wait patterns, and console log fallback verification.
# Phaser Scene Navigation ## Overview Standardize Phaser scene transitions and navigation testing patterns. Improve reliability of scene navigation testing. ## Scene Transition Methods - `this.scene.start('SceneName', data)` - Start new scene with data - `this.scene.switch('SceneName')` - Switch to existing scene - Test seam: `window.__TEST__.commands.clickStartGame()` - Navigate via UI See `references/transition-methods.md` for detailed transition patterns. ## Navigation Testing **Use test seam commands when available**: - `clickStartGame()` - Navigate to game - `clickPlayAgain()` - Restart game **Wait patterns**: - Wait for scene initialization before accessing test seam - Wait 1-2 seconds after transition before checking test seam - Use console logs to verify scene transitions **Don't rely solely on test seam sceneKey** (may lag on transitions) See `references/navigation-testing.md` for detailed testing patterns. ## Scene Lifecycle - Test seams are set up in `create()` method - Each scene creates its own `window.__TEST__` object - Old scene's test seam may persist briefly after transition - Wait 1-2 seconds after transition before checking test seam ## Common Navigation Patterns - **MainMenu → GameScene**: Use `clickStartGame()` test command - **GameScene → LevelCompleteScene**: Automatic on exit reach - **GameScene → GameOverScene**: Automatic on timer expire - **Any scene → MainMenu**: Use `this.scene.start('MainMenu')` ## Resources - `references/transition-methods.md` - Scene transition methods and data passing - `references/navigation-testing.md` - Wait patterns, console log verification
View on GitHub