Browse Source

small fixes

Load_Fix
Robert Chen 11 years ago
parent
commit
183994f6b2
  1. 1
      js/main.js
  2. 2
      js/screens.js
  3. 9
      js/ui.js

1
js/main.js

@ -24,6 +24,7 @@ function GameState(){ @@ -24,6 +24,7 @@ function GameState(){
this.alarmTimer = 0;
this.alarmBought = false;
this.alarmActivated = false;
this.turkeyCookCounter = 0;
// stats
this.storeVisits = 0;

2
js/screens.js

@ -395,7 +395,7 @@ function ScoreScreen( stage, gameState ){ @@ -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();

9
js/ui.js

@ -400,7 +400,7 @@ function OvenUI( stage, gameState ){ @@ -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 ){ @@ -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 @@ -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","");

Loading…
Cancel
Save