diff --git a/resources/image/object/grilled_meat/trash_can.afdesign b/resources/image/object/grilled_meat/trash_can.afdesign new file mode 100644 index 0000000..18a4c90 Binary files /dev/null and b/resources/image/object/grilled_meat/trash_can.afdesign differ diff --git a/resources/image/object/grilled_meat/trash_can.png b/resources/image/object/grilled_meat/trash_can.png new file mode 100644 index 0000000..830aefd Binary files /dev/null and b/resources/image/object/grilled_meat/trash_can.png differ diff --git a/src/game/mouse/grilled_meat/game.js b/src/game/mouse/grilled_meat/game.js index 80ea9dc..30ed194 100644 --- a/src/game/mouse/grilled_meat/game.js +++ b/src/game/mouse/grilled_meat/game.js @@ -62,18 +62,20 @@ var Game = { this.meatPlate.anchor.set(0.5); this.meatPlate.smoothed = false; - // this.heatPlate = game.add.image(game.world.centerX, Game.HEAT_PLATE_POSITION_Y, 'heat_plate'); + // this.heatPlate = game.add.image(game.world.centerX, HeatPlate.POSITION_Y, 'heat_plate'); // this.heatPlate.anchor.set(0.5); // this.heatPlate.smoothed = false; // this.heatPlate.scale.set(1); - this.heatPlate = new HeatPlate(game.world.centerX, Game.HEAT_PLATE_POSITION_Y); - this.stoveDial = new StoveDial(80, Game.HEAT_PLATE_POSITION_Y + 50); + this.heatPlate = new HeatPlate(); + this.stoveDial = new StoveDial(80, Game.HEAT_PLATE_POSITION_Y + 70); this.stoveDial.setOnChangeDialLevelHandler( (function(dialLevel) { this.onChangeDialLevel(dialLevel); }).bind(this) ); - this.god = new God(game.world.width - 120, Game.GOD_POSITION_Y + 100, this); + this.trashCan = new TrashCan(); + + this.god = new God(God.POSITION_X, God.POSITION_Y, this); // meat this.meatGroup = game.add.group(); @@ -354,5 +356,4 @@ Game.GOD_OUT_OF_FACE_WIDTH = 30; Game.GOD_OUT_OF_FACE_HEIGHT = 30; Game.MEAT_PLATE_POSITION_Y = 360; -Game.GOD_POSITION_Y = 240; -Game.HEAT_PLATE_POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 220; +Game.HEAT_PLATE_POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200; \ No newline at end of file diff --git a/src/game/mouse/grilled_meat/god.js b/src/game/mouse/grilled_meat/god.js index 11d0b67..80644cc 100644 --- a/src/game/mouse/grilled_meat/god.js +++ b/src/game/mouse/grilled_meat/god.js @@ -15,6 +15,11 @@ function God(x, y, mainGame) { game.add.existing(this); + this.makeParticles(x, y); +} + + +God.prototype.makeParticles = function(x, y) { game.physics.startSystem(Phaser.Physics.ARCADE); this.fullHeartEmitter = game.add.emitter(x, y - 150, 20); @@ -51,7 +56,6 @@ function God(x, y, mainGame) { ); } - God.prototype.update = function() { } @@ -132,6 +136,9 @@ God.prototype.particleBurst = function(reaction) { } +God.POSITION_X = GAME_SCREEN_SIZE.x - 120; +God.POSITION_Y = 340; + God.REACTION_HAPPY = 0; God.REACTION_SMILE = 1; God.REACTION_ANGRY = 2; \ No newline at end of file diff --git a/src/game/mouse/grilled_meat/heat_plate.js b/src/game/mouse/grilled_meat/heat_plate.js index b9f41f6..66dee68 100644 --- a/src/game/mouse/grilled_meat/heat_plate.js +++ b/src/game/mouse/grilled_meat/heat_plate.js @@ -1,8 +1,8 @@ HeatPlate.prototype = Object.create(Phaser.Sprite.prototype); HeatPlate.prototype.constructor = HeatPlate; -function HeatPlate(x, y) { - Phaser.Sprite.call(this, game, x, y, 'heat_plate'); +function HeatPlate() { + Phaser.Sprite.call(this, game, HeatPlate.POSITION_X, HeatPlate.POSITION_Y, 'heat_plate'); this.anchor.set(0.5); // this.scale.set(0.5); this.smoothed = false; @@ -46,6 +46,8 @@ HeatPlate.prototype.onChangeDialLevel = function(dialLevel) { } +HeatPlate.POSITION_X = GAME_SCREEN_SIZE.x / 2; +HeatPlate.POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200; HeatPlate.BURN_LEVEL_WEAK = 0; HeatPlate.BURN_LEVEL_NORMAL = 1; diff --git a/src/game/mouse/grilled_meat/loading.js b/src/game/mouse/grilled_meat/loading.js index 3b62304..b9a43c1 100644 --- a/src/game/mouse/grilled_meat/loading.js +++ b/src/game/mouse/grilled_meat/loading.js @@ -39,6 +39,8 @@ var Loading = { game.load.image('heat_plate_flame', '../../../resources/image/object/grilled_meat/heat_plate_flame.png'); game.load.image('heat_plate', '../../../resources/image/object/grilled_meat/heat_plate.png'); + game.load.image('trash_can', '../../../resources/image/object/grilled_meat/trash_can.png'); + game.load.image('meat1', '../../../resources/image/object/grilled_meat/meat1.png'); game.load.image('meat2', '../../../resources/image/object/grilled_meat/meat2.png'); game.load.image('meat3', '../../../resources/image/object/grilled_meat/meat3.png'); diff --git a/src/game/mouse/grilled_meat/stove_dial.js b/src/game/mouse/grilled_meat/stove_dial.js index 1dae4d1..946c12d 100644 --- a/src/game/mouse/grilled_meat/stove_dial.js +++ b/src/game/mouse/grilled_meat/stove_dial.js @@ -4,7 +4,7 @@ StoveDial.prototype.constructor = StoveDial; function StoveDial(x, y) { Phaser.Sprite.call(this, game, x, y, 'stove_dial'); this.anchor.set(0.5); - // this.scale.set(0.5); + this.scale.set(1.3); this.smoothed = false; this.inputEnabled = true; game.add.existing(this); diff --git a/src/game/mouse/grilled_meat/trash_can.js b/src/game/mouse/grilled_meat/trash_can.js new file mode 100644 index 0000000..4d64cab --- /dev/null +++ b/src/game/mouse/grilled_meat/trash_can.js @@ -0,0 +1,15 @@ +TrashCan.prototype = Object.create(Phaser.Sprite.prototype); +TrashCan.prototype.constructor = TrashCan; + +function TrashCan() { + Phaser.Sprite.call(this, game, TrashCan.POSITION_X, TrashCan.POSITION_Y, 'trash_can'); + this.anchor.set(0.5); + // this.scale.set(1); + this.smoothed = false; + this.inputEnabled = false; + game.add.existing(this); +} + + +TrashCan.POSITION_X = God.POSITION_X - 200; +TrashCan.POSITION_Y = God.POSITION_Y - 30; \ No newline at end of file diff --git a/src/web/client/grilled_meat.html b/src/web/client/grilled_meat.html index 1c89ee6..cba9bbd 100644 --- a/src/web/client/grilled_meat.html +++ b/src/web/client/grilled_meat.html @@ -71,6 +71,7 @@ +