Some asteroids rotate in opposite direction
This commit is contained in:
parent
65b99a20d8
commit
80f5d502c3
1 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ export default class Asteroid extends Phaser.Physics.Arcade.Sprite {
|
|||
scene.physics.add.existing(this)
|
||||
|
||||
this.anims.play(Asteroid.getRandomAnimationName())
|
||||
if (Phaser.Math.RND.integer() % 2 == 0)
|
||||
this.anims.reverse()
|
||||
|
||||
this.setCircle(30, 30, 30)
|
||||
this.setScale(Phaser.Math.RND.realInRange(0.7, 1.3))
|
||||
this.setVelocity(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue