Fix: bonus meat

This commit is contained in:
2019-12-10 08:31:48 +09:00
parent f77057ed8e
commit dec4692b31
8 changed files with 22 additions and 17 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 60 KiB

+6 -5
View File
@@ -6,16 +6,18 @@ function BonusMeat(mainGame) {
MeatBase.call(this); MeatBase.call(this);
this.setMeatTypeVariables(); this.setBonusMeatTypeVariables();
this.setSprite(); this.setBonusMeatSprite();
} }
BonusMeat.prototype.setMeatTypeVariables = function() { BonusMeat.prototype.setBonusMeatTypeVariables = function() {
this.cookingSpeed = BonusMeat.COOKING_SPEED_BURN_LEVEL_WEAK; this.cookingSpeed = BonusMeat.COOKING_SPEED_BURN_LEVEL_WEAK;
} }
BonusMeat.prototype.setSprite = function() { BonusMeat.prototype.setBonusMeatSprite = function() {
this.baseScale = 0.5;
this.spriteNameRare = BonusMeat.SPRITE_NAME_RARE; this.spriteNameRare = BonusMeat.SPRITE_NAME_RARE;
this.spriteNameWelldone = BonusMeat.SPRITE_NAME_WELLDONE; this.spriteNameWelldone = BonusMeat.SPRITE_NAME_WELLDONE;
this.spriteNameBurnBlack = BonusMeat.SPRITE_NAME_BURN_BLACK; this.spriteNameBurnBlack = BonusMeat.SPRITE_NAME_BURN_BLACK;
@@ -24,7 +26,6 @@ BonusMeat.prototype.setSprite = function() {
} }
BonusMeat.COOKING_SPEED_BURN_LEVEL_WEAK = 0.1; BonusMeat.COOKING_SPEED_BURN_LEVEL_WEAK = 0.1;
BonusMeat.COOKING_SPEED_BURN_LEVEL_NORMAL = 0.2; BonusMeat.COOKING_SPEED_BURN_LEVEL_NORMAL = 0.2;
BonusMeat.COOKING_SPEED_BURN_LEVEL_STRONG = 0.3; BonusMeat.COOKING_SPEED_BURN_LEVEL_STRONG = 0.3;
+2 -2
View File
@@ -87,8 +87,8 @@ var Game = {
this.meatGroup.add(meat); this.meatGroup.add(meat);
} }
// this.normalMeat = new NormalMeat(this); this.bonusMeat = new BonusMeat(this);
// this.meatBase = new MeatBase(); // this.bonusMeat.setActive(false, -100, -100, "");
// speech bubble // speech bubble
+9 -6
View File
@@ -42,16 +42,19 @@ var Loading = {
game.load.image('trash_can', '../../../resources/image/object/grilled_meat/trash_can.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('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');
game.load.image('bonus_meat', '../../../resources/image/object/grilled_meat/meat_bonus.png');
game.load.image('meat_welldone1', '../../../resources/image/object/grilled_meat/meat1_welldone.png'); game.load.image('meat_welldone1', '../../../resources/image/object/grilled_meat/meat1_welldone.png');
game.load.image('meat_welldone2', '../../../resources/image/object/grilled_meat/meat2_welldone.png');
game.load.image('meat_welldone3', '../../../resources/image/object/grilled_meat/meat3_welldone.png');
game.load.image('bonus_meat_welldone', '../../../resources/image/object/grilled_meat/meat_bonus_welldone.png');
game.load.image('meat_burn1', '../../../resources/image/object/grilled_meat/meat1_burn.png'); game.load.image('meat_burn1', '../../../resources/image/object/grilled_meat/meat1_burn.png');
game.load.image('meat2', '../../../resources/image/object/grilled_meat/meat2.png');
game.load.image('meat_burn2', '../../../resources/image/object/grilled_meat/meat2_burn.png'); game.load.image('meat_burn2', '../../../resources/image/object/grilled_meat/meat2_burn.png');
game.load.image('meat_welldone2', '../../../resources/image/object/grilled_meat/meat2_welldone.png');
game.load.image('meat3', '../../../resources/image/object/grilled_meat/meat3.png');
game.load.image('meat_welldone3', '../../../resources/image/object/grilled_meat/meat3_welldone.png');
game.load.image('meat_burn3', '../../../resources/image/object/grilled_meat/meat3_burn.png'); game.load.image('meat_burn3', '../../../resources/image/object/grilled_meat/meat3_burn.png');
game.load.image('bonus_meat', '../../../resources/image/object/grilled_meat/meat_bonus.png');
game.load.image('bonus_meat_welldone', '../../../resources/image/object/grilled_meat/meat_bonus_welldone.png');
game.load.image('bonus_meat_burn', '../../../resources/image/object/grilled_meat/meat_bonus_burn.png'); game.load.image('bonus_meat_burn', '../../../resources/image/object/grilled_meat/meat_bonus_burn.png');
game.load.image('smoke', '../../../resources/image/ui/smoke.png'); game.load.image('smoke', '../../../resources/image/ui/smoke.png');
+4 -4
View File
@@ -6,13 +6,13 @@ function NormalMeat(mainGame) {
MeatBase.call(this); MeatBase.call(this);
this.setMeatTypeVariables(); this.setNormalMeatTypeVariables();
this.randomizeMeatType(); this.randomizeMeatType();
this.setSprite(); this.setNormalMeatSprite();
} }
NormalMeat.prototype.setMeatTypeVariables = function() { NormalMeat.prototype.setNormalMeatTypeVariables = function() {
this.cookingSpeed = NormalMeat.COOKING_SPEED_BURN_LEVEL_WEAK; this.cookingSpeed = NormalMeat.COOKING_SPEED_BURN_LEVEL_WEAK;
} }
@@ -20,7 +20,7 @@ NormalMeat.prototype.randomizeMeatType = function() {
this.meatType = Math.floor(Math.random() * 3) + 1; this.meatType = Math.floor(Math.random() * 3) + 1;
} }
NormalMeat.prototype.setSprite = function() { NormalMeat.prototype.setNormalMeatSprite = function() {
switch(this.meatType) { switch(this.meatType) {
case 1: case 1:
this.baseScale = 0.4; this.baseScale = 0.4;
+1
View File
@@ -69,6 +69,7 @@
<script src="../../game/mouse/grilled_meat/meat.js"></script> <script src="../../game/mouse/grilled_meat/meat.js"></script>
<script src="../../game/mouse/grilled_meat/meat_base.js"></script> <script src="../../game/mouse/grilled_meat/meat_base.js"></script>
<script src="../../game/mouse/grilled_meat/normal_meat.js"></script> <script src="../../game/mouse/grilled_meat/normal_meat.js"></script>
<script src="../../game/mouse/grilled_meat/bonus_meat.js"></script>
<script src="../../game/mouse/grilled_meat/plus_score.js"></script> <script src="../../game/mouse/grilled_meat/plus_score.js"></script>
<script src="../../game/mouse/grilled_meat/speech_bubble.js"></script> <script src="../../game/mouse/grilled_meat/speech_bubble.js"></script>
<script src="../../game/mouse/grilled_meat/heat_plate.js"></script> <script src="../../game/mouse/grilled_meat/heat_plate.js"></script>