|
@@ -235,8 +235,7 @@ class Bomb {
|
|
const texture = bitmap.generateTexture('flameParticle', 50, 50);
|
|
const texture = bitmap.generateTexture('flameParticle', 50, 50);
|
|
|
|
|
|
// 粒子发射器
|
|
// 粒子发射器
|
|
- this.bombEmit = this.game.add.particles(texture.key);
|
|
|
|
- this.bombEmit.createEmitter({
|
|
|
|
|
|
+ this.bombEmit = this.game.add.particles(0, 0, texture.key, {
|
|
x: -30,
|
|
x: -30,
|
|
y: -30,
|
|
y: -30,
|
|
speed: { min: -100, max: 100 },
|
|
speed: { min: -100, max: 100 },
|
|
@@ -403,7 +402,8 @@ class Fruit {
|
|
this.bitmap = this.game.make.graphics({ x: 0, y: 0, add: false });
|
|
this.bitmap = this.game.make.graphics({ x: 0, y: 0, add: false });
|
|
|
|
|
|
// 粒子发射器
|
|
// 粒子发射器
|
|
- this.emitter = this.game.add.particles('flameParticle');
|
|
|
|
|
|
+ this.emitter = this.game.add.particles(0, 0, 'flameParticle', {
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
half(deg, shouldEmit = false) {
|
|
half(deg, shouldEmit = false) {
|
|
@@ -448,8 +448,8 @@ class Fruit {
|
|
this.generateFlame(this.bitmap, emitColor);
|
|
this.generateFlame(this.bitmap, emitColor);
|
|
const texture = this.bitmap.generateTexture('fruitParticle', 60, 60);
|
|
const texture = this.bitmap.generateTexture('fruitParticle', 60, 60);
|
|
|
|
|
|
- this.emitter = this.game.add.particles(texture.key);
|
|
|
|
- this.emitter.createEmitter({
|
|
|
|
|
|
+
|
|
|
|
+ this.emitter = this.game.add.particles(0, 0, texture.key, {
|
|
x: this.sprite.x,
|
|
x: this.sprite.x,
|
|
y: this.sprite.y,
|
|
y: this.sprite.y,
|
|
speed: { min: -400, max: 400 },
|
|
speed: { min: -400, max: 400 },
|
|
@@ -1068,25 +1068,25 @@ class PlayScene extends Phaser.Scene {
|
|
delay: 1000
|
|
delay: 1000
|
|
});
|
|
});
|
|
|
|
|
|
-this.tweens.chain({
|
|
|
|
- targets: lose,
|
|
|
|
- tweens: [
|
|
|
|
- {
|
|
|
|
- scale: 1,
|
|
|
|
- duration: 300,
|
|
|
|
- ease: 'Sine.InOut'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- scale: 0,
|
|
|
|
- duration: 300,
|
|
|
|
- ease: 'Sine.InOut',
|
|
|
|
- delay: 1000,
|
|
|
|
- onComplete: () => {
|
|
|
|
- lose.destroy();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
-});
|
|
|
|
|
|
+ this.tweens.chain({
|
|
|
|
+ targets: lose,
|
|
|
|
+ tweens: [
|
|
|
|
+ {
|
|
|
|
+ scale: 1,
|
|
|
|
+ duration: 300,
|
|
|
|
+ ease: 'Sine.InOut'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ scale: 0,
|
|
|
|
+ duration: 300,
|
|
|
|
+ ease: 'Sine.InOut',
|
|
|
|
+ delay: 1000,
|
|
|
|
+ onComplete: () => {
|
|
|
|
+ lose.destroy();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
tweenShow.play();
|
|
tweenShow.play();
|
|
|
|
|
|
tweenHide.on('complete', () => {
|
|
tweenHide.on('complete', () => {
|