Add: stove dial, heat plate

This commit is contained in:
2019-12-06 10:19:36 +09:00
parent b40749b4a4
commit 2e14ebc10d
17 changed files with 318 additions and 9 deletions
+16 -4
View File
@@ -62,10 +62,16 @@ 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.anchor.set(0.5);
this.heatPlate.smoothed = false;
this.heatPlate.scale.set(1);
// this.heatPlate = game.add.image(game.world.centerX, Game.HEAT_PLATE_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.stoveDial.setOnChangeDialLevelHandler(
(function(dialLevel) { this.onChangeDialLevel(dialLevel); }).bind(this)
);
this.god = new God(game.world.width - 120, Game.GOD_POSITION_Y + 100, this);
@@ -112,9 +118,15 @@ var Game = {
this.meatCount;
this.badMeatCount = 0;
this.burnLevel = HeatPlate.BURN_LEVEL_WEAK;
},
onChangeDialLevel: function(dialLevel) {
this.burnLevel = dialLevel;
this.heatPlate.onChangeDialLevel(dialLevel);
},
back: function() {
sessionStorageManager.resetPlayingAppData();