Fix: bonus meat
This commit is contained in:
@@ -6,16 +6,18 @@ function BonusMeat(mainGame) {
|
||||
|
||||
MeatBase.call(this);
|
||||
|
||||
this.setMeatTypeVariables();
|
||||
this.setSprite();
|
||||
this.setBonusMeatTypeVariables();
|
||||
this.setBonusMeatSprite();
|
||||
}
|
||||
|
||||
|
||||
BonusMeat.prototype.setMeatTypeVariables = function() {
|
||||
BonusMeat.prototype.setBonusMeatTypeVariables = function() {
|
||||
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.spriteNameWelldone = BonusMeat.SPRITE_NAME_WELLDONE;
|
||||
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_NORMAL = 0.2;
|
||||
BonusMeat.COOKING_SPEED_BURN_LEVEL_STRONG = 0.3;
|
||||
|
||||
@@ -87,8 +87,8 @@ var Game = {
|
||||
this.meatGroup.add(meat);
|
||||
}
|
||||
|
||||
// this.normalMeat = new NormalMeat(this);
|
||||
// this.meatBase = new MeatBase();
|
||||
this.bonusMeat = new BonusMeat(this);
|
||||
// this.bonusMeat.setActive(false, -100, -100, "");
|
||||
|
||||
|
||||
// speech bubble
|
||||
|
||||
@@ -42,16 +42,19 @@ var Loading = {
|
||||
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');
|
||||
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_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('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_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('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('smoke', '../../../resources/image/ui/smoke.png');
|
||||
|
||||
@@ -6,13 +6,13 @@ function NormalMeat(mainGame) {
|
||||
|
||||
MeatBase.call(this);
|
||||
|
||||
this.setMeatTypeVariables();
|
||||
this.setNormalMeatTypeVariables();
|
||||
this.randomizeMeatType();
|
||||
this.setSprite();
|
||||
this.setNormalMeatSprite();
|
||||
}
|
||||
|
||||
|
||||
NormalMeat.prototype.setMeatTypeVariables = function() {
|
||||
NormalMeat.prototype.setNormalMeatTypeVariables = function() {
|
||||
this.cookingSpeed = NormalMeat.COOKING_SPEED_BURN_LEVEL_WEAK;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ NormalMeat.prototype.randomizeMeatType = function() {
|
||||
this.meatType = Math.floor(Math.random() * 3) + 1;
|
||||
}
|
||||
|
||||
NormalMeat.prototype.setSprite = function() {
|
||||
NormalMeat.prototype.setNormalMeatSprite = function() {
|
||||
switch(this.meatType) {
|
||||
case 1:
|
||||
this.baseScale = 0.4;
|
||||
|
||||
Reference in New Issue
Block a user