Browse Source

10 seconds

Load_Fix
Robert Chen 11 years ago
parent
commit
aa0cbae444
  1. 34
      js/ui.js

34
js/ui.js

@ -310,27 +310,27 @@ function OvenUI( stage, gameState ){ @@ -310,27 +310,27 @@ function OvenUI( stage, gameState ){
tick: function(){
// IMPORTANT: SECOND TIMER
var diff = Date.now() - gameState.oldTime;
if( diff > 1000 ){
if( diff > 10000 ){
gameState.oldTime = Date.now();
that.secondTick( diff );
console.log(new Date( gameState.currentTime) );
if( gameState.turkeyBought ){
// what's the state of the turkey
turkeyState = ovenModel.getTurkeyState();
turkeyStates[0].alpha = 1;
if( turkeyState["skin"]["cond"][0] == "Undercooked" )
turkeyStates[1].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Cooked" )
turkeyStates[2].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Dry" )
turkeyStates[3].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Charcoal" )
turkeyStates[4].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "House Fire" )
turkeyStates[4].alpha = 1;
}
if( gameState.turkeyBought ){
// what's the state of the turkey
turkeyState = ovenModel.getTurkeyState();
turkeyStates[0].alpha = 1;
if( turkeyState["skin"]["cond"][0] == "Undercooked" )
turkeyStates[1].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Cooked" )
turkeyStates[2].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Dry" )
turkeyStates[3].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "Charcoal" )
turkeyStates[4].alpha = turkeyState["skin"]["cond"][1];
if( turkeyState["skin"]["cond"][0] == "House Fire" )
turkeyStates[4].alpha = 1;
}
}
},
render: function(){

Loading…
Cancel
Save