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.

설치로 이동

소스 정보

저장소
pmarashian/cursor-agent-skills
최근 소스 활동
2026년 2월 13일 19:51
감지된 SKILL.md 언어
영어
스타
2
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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
GitHub에서 보기