File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Bullets extends Phaser.Group {
1010 this . x = BULLETS . x
1111 this . y = BULLETS . y
1212
13- this . stack = [ ]
13+ this . queue = [ ]
1414 this . updateTime = 0
1515
1616 this . fire = this . fire . bind ( this )
@@ -25,16 +25,16 @@ class Bullets extends Phaser.Group {
2525 }
2626
2727 fire ( column ) {
28- if ( this . stack . includes ( column ) ) {
28+ if ( this . queue . includes ( column ) ) {
2929 return
3030 }
3131
32- this . stack . push ( column )
32+ this . queue . push ( column )
3333 }
3434
3535 remove ( column ) {
36- const index = this . stack . indexOf ( column )
37- this . stack . splice ( index , 1 )
36+ const index = this . queue . indexOf ( column )
37+ this . queue . splice ( index , 1 )
3838 }
3939
4040 render ( ) {
@@ -44,7 +44,7 @@ class Bullets extends Phaser.Group {
4444 return
4545 }
4646
47- this . stack . forEach ( column => {
47+ this . queue . forEach ( column => {
4848 this . children [ column ] . render ( )
4949 } )
5050
You can’t perform that action at this time.
0 commit comments