@@ -6,6 +6,7 @@ export class MenuScene extends Phaser.Scene {
66 private seedInputText : string = '' ;
77 private seedInputBox ?: Phaser . GameObjects . Text ;
88 private isInputActive : boolean = false ;
9+ private skipTutorial : boolean = false ;
910
1011 constructor ( ) {
1112 super ( { key : 'MenuScene' } ) ;
@@ -95,6 +96,48 @@ export class MenuScene extends Phaser.Scene {
9596 const inputZone = this . add . zone ( width / 2 - 200 , 360 , 400 , 50 ) . setOrigin ( 0 , 0 ) ;
9697 inputZone . setInteractive ( { useHandCursor : true } ) ;
9798
99+ // Skip Tutorial checkbox
100+ const checkboxY = 450 ;
101+ const checkboxSize = 20 ;
102+ const checkboxX = width / 2 - 80 ;
103+
104+ // Checkbox background
105+ const checkboxBg = this . add . graphics ( ) ;
106+ checkboxBg . fillStyle ( 0x2c3e50 , 1 ) ;
107+ checkboxBg . fillRect ( checkboxX , checkboxY , checkboxSize , checkboxSize ) ;
108+ checkboxBg . lineStyle ( 2 , 0x95a5a6 , 1 ) ;
109+ checkboxBg . strokeRect ( checkboxX , checkboxY , checkboxSize , checkboxSize ) ;
110+
111+ // Checkmark (initially hidden)
112+ const checkmark = this . add . text ( checkboxX + checkboxSize / 2 , checkboxY + checkboxSize / 2 , '✓' , {
113+ fontSize : '16px' ,
114+ color : '#2ecc71' ,
115+ fontStyle : 'bold' ,
116+ } ) . setOrigin ( 0.5 ) ;
117+ checkmark . setVisible ( false ) ;
118+
119+ // Checkbox label
120+ this . add . text ( checkboxX + checkboxSize + 10 , checkboxY + 2 , 'Skip Tutorial' , {
121+ fontSize : '16px' ,
122+ color : '#ecf0f1' ,
123+ } ) ;
124+
125+ // Make checkbox interactive
126+ const checkboxZone = this . add . zone ( checkboxX , checkboxY , 150 , checkboxSize ) . setOrigin ( 0 , 0 ) ;
127+ checkboxZone . setInteractive ( { useHandCursor : true } ) ;
128+
129+ checkboxZone . on ( 'pointerdown' , ( ) => {
130+ this . skipTutorial = ! this . skipTutorial ;
131+ checkmark . setVisible ( this . skipTutorial ) ;
132+
133+ // Update checkbox appearance
134+ checkboxBg . clear ( ) ;
135+ checkboxBg . fillStyle ( this . skipTutorial ? 0x27ae60 : 0x2c3e50 , 1 ) ;
136+ checkboxBg . fillRect ( checkboxX , checkboxY , checkboxSize , checkboxSize ) ;
137+ checkboxBg . lineStyle ( 2 , this . skipTutorial ? 0x2ecc71 : 0x95a5a6 , 1 ) ;
138+ checkboxBg . strokeRect ( checkboxX , checkboxY , checkboxSize , checkboxSize ) ;
139+ } ) ;
140+
98141 inputZone . on ( 'pointerdown' , ( ) => {
99142 this . isInputActive = true ;
100143 inputBoxBg . clear ( ) ;
@@ -133,8 +176,8 @@ export class MenuScene extends Phaser.Scene {
133176 } ) ;
134177
135178 // Menu buttons
136- const buttonY = 490 ;
137- const buttonSpacing = 70 ;
179+ const buttonY = 510 ;
180+ const buttonSpacing = 60 ;
138181
139182 // Check if there's a saved game (not first time)
140183 const hasSavedGame = state . stats . totalRuns > 0 ;
@@ -239,8 +282,12 @@ export class MenuScene extends Phaser.Scene {
239282
240283 this . cameras . main . fadeOut ( 300 , 0 , 0 , 0 ) ;
241284 this . cameras . main . once ( 'camerafadeoutcomplete' , ( ) => {
242- // Skip tutorial if already completed
243- if ( state . tutorialComplete ) {
285+ // Skip tutorial if checkbox is checked or already completed
286+ if ( this . skipTutorial || state . tutorialComplete ) {
287+ // Mark tutorial as complete if skipping
288+ if ( this . skipTutorial ) {
289+ this . gameStateManager . setState ( { tutorialComplete : true } ) ;
290+ }
244291 this . scene . start ( 'HouseScene' ) ;
245292 } else {
246293 this . scene . start ( 'TutorialScene' ) ;
0 commit comments