Add: trash can eats burned black meat

This commit is contained in:
2019-12-10 11:32:31 +09:00
parent dfbe501393
commit fd13296cdf
5 changed files with 77 additions and 15 deletions
+6 -1
View File
@@ -137,6 +137,8 @@ MeatBase.prototype.onDragStopListener = function(pointer) {
if(this.mainGame.isOverGod(this.x, this.y) == true) {
// console.log("isOverGod : " + isOverGod(this.x, this.y));
this.mainGame.godEatMeat(this);
} else if(this.mainGame.isOverTrashCan(this.x, this.y) == true) {
this.mainGame.throwAway(this);
}
}
@@ -155,6 +157,9 @@ MeatBase.prototype.getScore = function() {
var scoreDoneness = this.scoreArray[meatDoneness];
var totalCookingTime = this.getTotalCookingTime();
if(meatDoneness == MeatBase.DONENESS_BURN_BLACK)
return scoreDoneness;
return scoreDoneness * totalCookingTime;
}
@@ -343,4 +348,4 @@ MeatBase.DONENESS_BURN_BLACK = 2;
MeatBase.DONENESS_NONE = 3;
MeatBase.COOK_TIME_WELLDONE = 20;
MeatBase.COOK_TIME_BURN = 400;
MeatBase.COOK_TIME_BURN = 40;