File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,22 +4,17 @@ import Phaser from 'phaser';
44export default class Laser extends Phaser . Physics . Arcade . Sprite {
55 constructor ( scene , x , y , key ) {
66 super ( scene , x , y , key ) ;
7-
87 scene . physics . world . enable ( this ) ;
98 scene . add . existing ( this ) ;
10-
119 this . setTexture ( key ) ;
1210 }
1311
1412 fire ( x , y ) {
1513 this . body . reset ( x , y - 30 ) ;
16-
1714 this . body . setSize ( 170 , 77 ) ;
18-
1915 this . body . enable = true ;
2016 this . setActive ( true ) ;
2117 this . setVisible ( true ) ;
22-
2318 this . setVelocityX ( 900 ) ;
2419 }
2520}
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ export default class Slash extends Phaser.Physics.Arcade.Sprite {
1212
1313 blade ( x , y ) {
1414 this . body . reset ( x , y ) ;
15-
16- // this.body.setSize(170, 77);
17-
1815 this . body . enable = true ;
1916 this . setActive ( true ) ;
2017 this . setVisible ( false ) ;
You can’t perform that action at this time.
0 commit comments