Created
July 5, 2018 07:35
-
-
Save scope2229/33d9f122f03584ad57fd7abc980bccd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launchTaiBomber(){ | |
console.log("lanuchTaiBomber"); | |
let launch = this.taiBombers.countActive(); | |
this.startingX = Phaser.Math.Between(100, 700); | |
if(this.score >= 50){ | |
if(launch == 0){ | |
let delay = Phaser.Math.Between(3000, 7000); | |
console.log(delay + "Time delay"); | |
console.log("lanuch is false now start emmiting enimes"); | |
console.log("taiBomb" + this); | |
let taibomber = this.taiBombers.getChildren(); | |
let tbRow1 = this.taiBombers.create(this.startingX, 120, 'taiBomber'); | |
tbRow1.body.velocity.y = 30; | |
let tbRow2 = this.taiBombers.create((this.startingX - 30), 70, 'taiBomber').setVelocityY(30); | |
let tbRow3 = this.taiBombers.create((this.startingX + 30), 70, 'taiBomber').setVelocityY(30); | |
console.log(tbRow1.y + ' first row location'); | |
this.time.delayedCall({ delay: 800, callback: this.launchTaiBomber, callbackScope: this }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment