NormalMeat.prototype = MeatBase.prototype; NormalMeat.constructor = NormalMeat; function NormalMeat(mainGame) { this.mainGame = mainGame; MeatBase.call(this); this.setNormalMeatTypeVariables(); this.randomizeMeatType(); this.setNormalMeatSprite(); } NormalMeat.prototype.setNormalMeatTypeVariables = function() { this.cookingSpeed = NormalMeat.COOKING_SPEED_BURN_LEVEL_WEAK; } NormalMeat.prototype.randomizeMeatType = function() { this.meatType = Math.floor(Math.random() * 3) + 1; } NormalMeat.prototype.setNormalMeatSprite = function() { switch(this.meatType) { case 1: this.baseScale = 0.4; break; case 2: this.baseScale = 0.4; break; case 3: this.baseScale = 0.5; break; } this.scale.set(this.baseScale); this.spriteNameRare = NormalMeat.SPRITE_NAME_RARE + this.meatType; this.spriteNameWelldone = NormalMeat.SPRITE_NAME_WELLDONE + this.meatType; this.spriteNameBurnBlack = NormalMeat.SPRITE_NAME_BURN_BLACK + this.meatType; this.loadTexture(this.spriteNameRare); } NormalMeat.COOKING_SPEED_BURN_LEVEL_WEAK = 0.1; NormalMeat.COOKING_SPEED_BURN_LEVEL_NORMAL = 0.2; NormalMeat.COOKING_SPEED_BURN_LEVEL_STRONG = 0.3; NormalMeat.SCORE_NAME_RARE = 10; NormalMeat.SCORE_NAME_WELLDONE = 100; NormalMeat.SCORE_NAME_BURN_BLACK = 0; NormalMeat.SPRITE_NAME_RARE = "meat"; NormalMeat.SPRITE_NAME_WELLDONE = "meat_welldone"; NormalMeat.SPRITE_NAME_BURN_BLACK = "meat_burn";