Fix: MeatBase - NormalMeat - BonusMeat

This commit is contained in:
2019-12-10 07:49:23 +09:00
parent 36298d7621
commit f77057ed8e
4 changed files with 51 additions and 44 deletions
+14 -13
View File
@@ -1,36 +1,37 @@
BonusMeat.prototype = MeatBase.prototype;
BonusMeat.constructor = BonusMeat;
function BonusMeat() {
MeatBase.call(this);
this.loadTexture("bonus_meat");
function BonusMeat(mainGame) {
this.mainGame = mainGame;
this.setMeatTypeVariables()
MeatBase.call(this);
this.setMeatTypeVariables();
this.setSprite();
}
BonusMeat.prototype.setMeatTypeVariables = function() {
this.cookingSpeed = BonusMeat.COOKING_SPEED_BURN_LEVEL_WEAK;
}
this.loadTexture('meat_burn1');
} else if(this.getMeatGradeBySide(Meat.MEAT_FRONT) == Meat.DONENESS_WELLDONE) {
this.loadTexture('meat_welldone1');
} else {
this.loadTexture('meat1');
BonusMeat.prototype.setSprite = function() {
this.spriteNameRare = BonusMeat.SPRITE_NAME_RARE;
this.spriteNameWelldone = BonusMeat.SPRITE_NAME_WELLDONE;
this.spriteNameBurnBlack = BonusMeat.SPRITE_NAME_BURN_BLACK;
this.spriteMeatBurnBlack =
this.loadTexture(this.spriteNameRare);
}
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_STRONG = 0.3;
BonusMeat.SCORE_NAME_RARE = 10;
BonusMeat.SCORE_NAME_WELLDONE = 100;
BonusMeat.SCORE_NAME_BURN_BLACK = 0;
BonusMeat.SCORE_NAME_BURN_BLACK = 0;
BonusMeat.SPRITE_NAME_RARE = "bonus_meat";
BonusMeat.SPRITE_NAME_WELLDONE = "bonus_meat_welldone";