Add: grilled meat basic sources

This commit is contained in:
2018-10-31 11:12:42 +09:00
parent 2e1ae58e7f
commit 5464642d9b
28 changed files with 965 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
var SMOKE_START_OFFSET_Y = 200;
var SMOKE_SPEED = 1;
/////////////////////////////
// PlusScore Class
Smoke = function(game, x, y) {
Phaser.Sprite.call(this, game, x, y - SMOKE_START_OFFSET_Y, 'smoke');
// this.anchor.set(0.5);
this.scale.set(0.5);
// console.log(this);
// this.addColor("#ffffff", 0);
// this.setStyle(textStyle);
this.inputEnabled = false;
game.time.events.add(Phaser.Timer.SECOND * 1, this.fadePlusScore, this);
game.time.events.add(Phaser.Timer.SECOND * 2, this.destroySelf, this);
game.add.existing(this);
}
Smoke.prototype = Object.create(Phaser.Sprite.prototype);
Smoke.prototype.constructor = Smoke;
Smoke.prototype.update = function() {
this.y -= SMOKE_SPEED;
}
Smoke.prototype.fadePlusScore = function() {
game.add.tween(this).to( { alpha: 0 }, 1000, Phaser.Easing.Linear.None, true);
}
Smoke.prototype.destroySelf = function() {
this.destroy();
}