diff --git a/js/main.js b/js/main.js index 7b0c94d..3a94f05 100644 --- a/js/main.js +++ b/js/main.js @@ -24,6 +24,7 @@ function GameState(){ this.alarmTimer = 0; this.alarmBought = false; this.alarmActivated = false; + this.turkeyCookCounter = 0; // stats this.storeVisits = 0; diff --git a/js/screens.js b/js/screens.js index 7b6e734..015bc96 100644 --- a/js/screens.js +++ b/js/screens.js @@ -395,7 +395,7 @@ function ScoreScreen( stage, gameState ){ var that = this; // All the text for the entries - var totalCookTime = gameState.ovenModel.getCookTime(); + var totalCookTime = gameState.turkeyCookCounter; var realTimeElapsed = Date.now() - gameState.startTime; var turkeyState = gameState.ovenModel.getTurkeyState(); diff --git a/js/ui.js b/js/ui.js index 01ecbe3..d00fc7d 100644 --- a/js/ui.js +++ b/js/ui.js @@ -400,7 +400,7 @@ function OvenUI( stage, gameState ){ } // if over 1100 F, burn house down - if( temp > 500 ){ + if( temp > 1100 ){ gameState.pubsub.publish("Death",""); return; } @@ -565,7 +565,7 @@ function OvenUI( stage, gameState ){ that.secondTick( diff ); if( gameState.turkeyBought ){ - + gameState.turkeyCookCounter++; // what's the state of the turkey turkeyState = gameState.ovenModel.getTurkeyState(); gameState.turkeyStates[0].alpha = 1; @@ -806,6 +806,11 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou gameState.turkeyType = that.name; gameState.marketItems[ that.name ].delete(); that.bought = true; + + // record time started + gameState.pubsub.publish( "AddRecord", {type:"Note ", text:"Turkey bought and placed in oven" ); + + gameState.pubsub.publish("Play", {name:"Buy", volume:0.7} ); gameState.pubsub.publish("WalletAmount", gameState.wallet - Math.abs(cost)) gameState.pubsub.publish("StartTurkeyModel","");