Add: child image

This commit is contained in:
2019-12-11 09:31:16 +09:00
parent ad229189c9
commit 0ee3ce04f9
5 changed files with 27 additions and 12 deletions
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+21 -6
View File
@@ -68,8 +68,9 @@ var Game = {
this.god = new God(this); this.god = new God(this);
this.waiter = new Waiter(); this.waiter = new Waiter();
this.meatPlate = game.add.image(220, Game.MEAT_PLATE_POSITION_Y, 'plate'); this.meatPlate = game.add.image(Game.MEAT_PLATE_POSITION_X, Game.MEAT_PLATE_POSITION_Y, 'plate');
this.meatPlate.anchor.set(0.5); this.meatPlate.anchor.set(0.5);
this.meatPlate.scale.set(0.8);
this.meatPlate.smoothed = false; this.meatPlate.smoothed = false;
this.heatPlate = new HeatPlate(); this.heatPlate = new HeatPlate();
@@ -196,7 +197,10 @@ var Game = {
this.badMeatCount = 0; this.badMeatCount = 0;
console.log("badMeatCount : " + this.badMeatCount); console.log("badMeatCount : " + this.badMeatCount);
this.activatedMeatCount = this.getStageMeatCount(); this.activatedMeatCount = this.getStageMeatCount();
this.serveMeats(); this.serveBonusMeat();
this.serveNormalMeats();
if(this.playingStageNo > 1)
this.waiter.animateServing(); this.waiter.animateServing();
}, },
@@ -209,13 +213,22 @@ var Game = {
return this.activatedMeatCount; return this.activatedMeatCount;
}, },
serveMeats: function() { serveBonusMeat: function() {
if(this.playingStageNo > 1 && this.badMeatCount == 0 && this.bonusMeat.isActivate() == false) { if(this.playingStageNo == 1)
return;
if(this.badMeatCount > 0)
return;
if(this.bonusMeat.isActivate())
return;
var randX = this.meatPlate.x - game.rnd.integerInRange(-100, 100); var randX = this.meatPlate.x - game.rnd.integerInRange(-100, 100);
var randY = this.meatPlate.y - game.rnd.integerInRange(-30, 30); var randY = this.meatPlate.y - game.rnd.integerInRange(-30, 30);
this.bonusMeat.setActive(true, randX, randY, ""); this.bonusMeat.setActive(true, randX, randY, "");
} },
serveNormalMeats: function() {
for(var i = 0; i < Game.MAX_MEAT_COUNT; i++) { for(var i = 0; i < Game.MAX_MEAT_COUNT; i++) {
var meat = this.meatGroup.children[i]; var meat = this.meatGroup.children[i];
meat.setActive(false, -100, -100, ""); meat.setActive(false, -100, -100, "");
@@ -434,5 +447,7 @@ Game.HEAT_PLATE_HEIGHT = 220;
Game.GOD_OUT_OF_FACE_WIDTH = 30; Game.GOD_OUT_OF_FACE_WIDTH = 30;
Game.GOD_OUT_OF_FACE_HEIGHT = 30; Game.GOD_OUT_OF_FACE_HEIGHT = 30;
Game.MEAT_PLATE_POSITION_Y = 360; Game.MEAT_PLATE_POSITION_X = 180;
Game.MEAT_PLATE_POSITION_Y = 390;
Game.HEAT_PLATE_POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200; Game.HEAT_PLATE_POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200;
+1 -1
View File
@@ -46,7 +46,7 @@ HeatPlate.prototype.onChangeDialLevel = function(dialLevel) {
} }
HeatPlate.POSITION_X = GAME_SCREEN_SIZE.x / 2; HeatPlate.POSITION_X = GAME_SCREEN_SIZE.x / 2 + 70;
HeatPlate.POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200; HeatPlate.POSITION_Y = GAME_SCREEN_SIZE.y / 2 + 200;
HeatPlate.BURN_LEVEL_WEAK = 0; HeatPlate.BURN_LEVEL_WEAK = 0;
+1 -1
View File
@@ -69,7 +69,7 @@ var Loading = {
game.load.image('god_smile', '../../../resources/image/character/god/god_smile.png'); game.load.image('god_smile', '../../../resources/image/character/god/god_smile.png');
game.load.image('god_happy', '../../../resources/image/character/god/god_happy.png'); game.load.image('god_happy', '../../../resources/image/character/god/god_happy.png');
game.load.image('waiter', '../../../resources/image/character/god/god_smile.png'); game.load.image('waiter', '../../../resources/image/character/child/child.png');
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png'); // game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png'); // game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');