Browse Source

Integrated model, temperature probe

Load_Fix
Robert Chen 11 years ago
parent
commit
b218c2201c
  1. 4
      js/dialogue.js
  2. 7
      js/main.js
  3. 167
      js/model.js
  4. 2
      js/stories.js
  5. 117
      js/ui.js
  6. BIN
      res/people/.DS_Store
  7. BIN
      res/people/Boyfriend.png
  8. BIN
      res/people/Brother.png
  9. BIN
      res/people/Cat.png
  10. BIN
      res/people/Characters/.DS_Store
  11. BIN
      res/people/Characters/Boyfriend.png
  12. BIN
      res/people/Characters/Brother.png
  13. BIN
      res/people/Characters/Cat.png
  14. BIN
      res/people/Characters/Dad.png
  15. BIN
      res/people/Characters/Girlfriend.png
  16. BIN
      res/people/Characters/Grandma.png
  17. BIN
      res/people/Characters/Grandpa.png
  18. BIN
      res/people/Characters/Mom.png
  19. BIN
      res/people/Dad.png
  20. BIN
      res/people/Girlfriend.png
  21. BIN
      res/people/Grandma.png
  22. BIN
      res/people/Grandpa.png
  23. BIN
      res/people/Mom.png
  24. BIN
      res/screens/.DS_Store

4
js/dialogue.js

@ -47,6 +47,10 @@ function DialogUI( stage, gameState ){ @@ -47,6 +47,10 @@ function DialogUI( stage, gameState ){
this.textContent.addEventListener( "click", function(){ setTimeout( clickEvent, 100); });
this.showDialog= function( textSeq ){
if( textSeq.seq == "custom" ){
story["custom"] = ["Me: " + textSeq.customText ];
}
that.currDialogueSeq = new DialogueSequence( textSeq.seq );
that.textContent.text=that.currDialogueSeq.next();
that.autoAdvance = textSeq.autoAdvance;

7
js/main.js

@ -10,6 +10,8 @@ function GameState(){ @@ -10,6 +10,8 @@ function GameState(){
this.gender = "Male";
this.wallet = 40.00;
this.hard = false;
this.boughtOvenLight = false;
this.turkeyWeight = 8;
// Load all our resources:
var queue = new createjs.LoadQueue(true);
@ -36,8 +38,6 @@ function GameState(){ @@ -36,8 +38,6 @@ function GameState(){
queue.loadFile( {id: "res/screens/DifficultyScreen/Difficulty-Selection.png", src:"res/screens/DifficultyScreen/Difficulty-Selection.png"} );
queue.loadFile( {id: "res/screens/DifficultyScreen/ButtonMale.png", src:"res/screens/DifficultyScreen/ButtonMale.png"} );
queue.loadFile( {id: "res/screens/DifficultyScreen/ButtonFemale.png", src:"res/screens/DifficultyScreen/ButtonFemale.png"} );
//queue.addEventListener("fileload", handleFileComplete);
// Load image assets
queue.loadFile( {id: "TurkeySpriteFile", src:"res/screens/MainScreen/TurkeySprite.png"} );
queue.loadFile( {id: "MainBackgroundFile", src:"res/screens/MainScreen/Main-Screen.png"} );
@ -157,6 +157,9 @@ function GameState(){ @@ -157,6 +157,9 @@ function GameState(){
queue.loadFile( {id: "res/items/Turkey1.png", src:"res/items/Turkey1.png"});
queue.loadFile( {id: "res/items/Turkey1Glow.png", src:"res/items/Turkey1Glow.png"});
// People photos
//queue.loadFile( {id: "res/people/Turkey1.png", src:"res/items/Turkey1.png"});
//queue.loadFile( {id: "res/people/Turkey1Glow.png", src:"res/items/Turkey1Glow.png"});
this.screenState = 0;
this.newScreen = "";

167
js/model.js

@ -1,11 +1,12 @@ @@ -1,11 +1,12 @@
function TurkeyLayer( name, percentRadius, turkeyModel, ovenModel ){
var that = this;
this.name = name;
this.initialTemp = 20;
this.waterContent = 100000;
this.Qdot = 0;
this.finalTemperature = 20;
this.name = name;
this.percentRadius=percentRadius;
this.initialTemp = 20;
this.waterLost = 0;
this.finalTemperature = 20;
this.cookCondition = "Raw";
return {
updateTemperatureTick: function(){
@ -16,42 +17,68 @@ function TurkeyLayer( name, percentRadius, turkeyModel, ovenModel ){ @@ -16,42 +17,68 @@ function TurkeyLayer( name, percentRadius, turkeyModel, ovenModel ){
percentRadius * turkeyModel.totalRadius,
turkeyModel.totalRadius,
that.initialTemp,
ovenModel.tempInfini,
ovenModel.steadyTemp,
ovenModel.globalTime );
that.initialTemp = that.finalTemperature;
}
that.waterLost = that.waterLost + UtilityFunctions.waterLoss( that.finalTemperature );
that.cookCondition = UtilityFunctions.cookCondition(that.waterLost);
console.log( that.name + ": "+ that.waterLost + " " + that.cookCondition);
},
resetLayerTemps: function(){
that.initialTemp = that.finalTemperature;
},
getCondition: function(){
return that.cookCondition;
},
getTemperature: function(){
return that.finalTemperature;
}
}
}
function TurkeyModel( weight, ovenModel ){
this.density = 996; // kg/m3 Assuming Density of Water 1000 kg/m3
this.cp = 2810; // J/kg K for Turkey
this.heatConvection = 5; // W/m2 K Some Reasonable estimate for natural Convection. Change as needed. 5-25
this.density = 1050; // kg/m3 Assuming Density of Water 1000 kg/m3
this.cp = 2000; // 2810 J/kg K for Turkey. Extra is to semi-account for water evaporation energy
this.heatConvection = 9; // W/m2 K Some Reasonable estimate for natural Convection. Change as needed. 5-25
this.thermalConduct = 0.412; // W/m K // Chicken
this.skin = {};
this.body = {};
this.core = {};
this.totalRadius = UtilityFunctions.calculateRadius( weight, this.density );
this.totalLayers = [ new TurkeyLayer("Skin", 0.85, this, ovenModel ),
new TurkeyLayer("Body", 0.45, this, ovenModel ),
new TurkeyLayer("Core", 0.05, this, ovenModel ) ];
new TurkeyLayer("Core", 0.01, this, ovenModel ) ];
// Whenever temperature is changed
this.updateLayerTemps = function() {
this.updateLayerTemps = function(){
for (var i in this.totalLayers ){
this.totalLayers[i].updateTemperatureTick();
}
}
};
this.resetLayerTemps = function(){
for (var i in this.totalLayers ){
this.totalLayers[i].resetLayerTemps();
}
};
}
function OvenModel( turkeyWeight, gameState ) {
var that = this;
this.tempInfini = 20; //C
this.tempInfini=20; //C
this.setTemp = 20;
this.steadyTemp = 20;
this.steadyTimer = 0;
this.globalTime = 0;
var turkey = new TurkeyModel( 8, this );
var turkey = new TurkeyModel(9.07185, this );
var proportional = 0.1; // This value is arbitrary to how fast you want the temperatures to converge. (Or oscillate, which could be realistic as well)
var errorTolerance = 5; //Stove is accurate to 1 degree Celcius Should hopefully oscillate below that value.
var proportional = 0.004; // This value is arbitrary to how fast you want the temperatures to converge. (Or oscillate, which could be realistic as well)
var errorTolerance = 10; //Stove is accurate to 1 degree Celcius Should hopefully oscillate below that value.
// Equalize temp will need to be sent each time iteration
this.equalizeTemp= function(){
var error = Math.abs(this.setTemp-this.tempInfini);
@ -63,36 +90,55 @@ function OvenModel( turkeyWeight, gameState ) { @@ -63,36 +90,55 @@ function OvenModel( turkeyWeight, gameState ) {
}
if( error>errorTolerance ) {
return (true) //Need to run the Heat Calculations again next cycle
if (this.steadyTimer>=80) {
//Reset the model's time calculation if there are major changes in the tolerance of the temperature or the steady timer expires
this.steadyTimer = 0;
this.steadyTemp = this.tempInfini
turkey.resetLayerTemps();
this.globalTime = 0;
}
return(true);
}
}
return {
getTurkeyState: function(){
return {
"skin" : {
"temp": turkey.totalLayers[0].getTemperature(),
"cond": turkey.totalLayers[0].getCondition()
},
"body" : {
"temp": turkey.totalLayers[1].getTemperature(),
"cond": turkey.totalLayers[1].getCondition()
},
"core" : {
"temp": turkey.totalLayers[2].getTemperature(),
"cond": turkey.totalLayers[2].getCondition()
}
};
},
changeTemp: function(setTemp){
console.log("temp changed to " + setTemp);
that.setTemp = setTemp;
},
secondTick: function(){
console.clear();
that.globalTime = that.globalTime + 1;
that.steadyTimer = that.steadyTimer + 1;
if ( that.equalizeTemp() ) {
// Turn on oven light
//gameState.pubsub.publish( "OvenLight", "On" );
//Reset the model's time calculation if there are major changes in the tolerance of the temperature
that.globalTime = 0;
gameState.pubsub.publish( "OvenLight", "On" );
}
else {
that.steadyTemp = that.tempInfini;
// Turn off oven light
//gameState.pubsub.publish( "OvenLight", "Off" );
that.globalTime = that.globalTime + 60;
gameState.pubsub.publish( "OvenLight", "Off" );
}
console.log( that.tempInfini )
console.log("Steady Temp " + that.steadyTemp)
console.log("Steady Timer " + that.steadyTimer)
console.log("Oven Temp " + that.tempInfini )
turkey.updateLayerTemps();
},
getTurkeyState: function(){
}
}
}
@ -115,7 +161,7 @@ UtilityFunctions = { @@ -115,7 +161,7 @@ UtilityFunctions = {
var height = 1/(ratioLvH /length);
var simpleRadius = length/2; //Doesn't take into account equal Volume
var rectangleVolume = depth*height*length*(1/3); //m^3 Multiple by 1/3 to account for triangular shape and empty Space
var rectangleVolume = depth*height*length; //m^3 Multiple by 1/4 to account for triangular shape and empty Space
var complexRadius = Math.pow(rectangleVolume/((4/3)*Math.PI), 1/3); //Volume of 3D Box = 3D Sphere
console.log("Simple Radius " + simpleRadius + " Meters")
@ -143,6 +189,15 @@ UtilityFunctions = { @@ -143,6 +189,15 @@ UtilityFunctions = {
return storage;
},
sphereVolume: function(radius) {
return((4/3)*Math.PI*Math.pow(radius,3))
},
waterLoss: function(temperature) {
return (Math.pow(10,(temperature-20)/80)-1)
},
bisectionMethod: function(min,max,Biot) {
errorTolerance = (1/Math.pow(10,8))
result = Infinity // some large value to ensure the calculation goes through.
@ -173,7 +228,7 @@ UtilityFunctions = { @@ -173,7 +228,7 @@ UtilityFunctions = {
transientSphereSeries: function( density, thermalConduct, heatConvection, cp, rPosition, rTotal, tempInitial, tempInfini, t ){
var min = 0;
var max = 1000; // This are for setting Lambda boundaries and nothing else
var max = 10000; // This are for setting Lambda boundaries and nothing else
var sum=0;
var alpha = thermalConduct/(density*cp);
@ -208,7 +263,7 @@ UtilityFunctions = { @@ -208,7 +263,7 @@ UtilityFunctions = {
tempAtTimeAndRadius=(sum*(tempInitial-tempInfini))+tempInfini
console.log("The Temperature at radius " + rPosition + " m and time " + t + " seconds is " + tempAtTimeAndRadius + " C or " + this.C2F(tempAtTimeAndRadius) + " F");
console.log("The Temperature at radius " + rPosition + " m and time " + t/60/60 + " hours is " + tempAtTimeAndRadius + " C or " + this.C2F(tempAtTimeAndRadius) + " F");
return(tempAtTimeAndRadius)
},
@ -219,30 +274,40 @@ UtilityFunctions = { @@ -219,30 +274,40 @@ UtilityFunctions = {
F2C: function( farenheit ) {
return ( (farenheit-32) *(5/9) );
},
lbs2kgs: function(){
lbs2kgs: function(pounds){
return pounds * 0.453592
},
randRange: function(lowVal,highVal) {
return Math.floor(Math.random()*(highVal-lowVal+1))+lowVal;
randRange: function(min, max){
return Math.floor(Math.random()*(max-min+1))+min;
},
cookCondition: function(cookValue,volume){
var multiplier = 1;
if (cookValue>=multiplier*600000) {
return("House Fire")
}
else if(cookValue>=multiplier*250000) {
return("Charcoal")
}
else if (cookValue>=multiplier*150000) {
return("Dry")
}
else if (cookValue>=multiplier*12000) {
return("Cooked")
}
else if (cookValue>=multiplier*5000) {
return("Undercooked")
}
else {
return("Raw")
}
}
}
//Running the Program Stuff
/*
var ovenObject = new OvenModel();
var turkey = new TurkeyModel( 8, ovenObject );
var turkey = new TurkeyModel(9.07185, ovenObject );
globalTime=0;
setInterval(function(){ovenObject.secondTick()},100);
ovenObject.changeTemp(100)
function time() {
console.clear()
if (ovenObject.equalizeTemp() ) {
globalTime = 0; //Reset the model's time calculation if there are major changes in the tolerance of the temperature
}
else {globalTime = globalTime +60 }
console.log( ovenObject.tempInfini )
turkey.updateLayerTemps();
}
setInterval(function(){ovenObject.secondTick();},10);
*/

2
js/stories.js

@ -4,6 +4,8 @@ var story = { @@ -4,6 +4,8 @@ var story = {
"CannotBuyTurkey" : ["Me: I've barely have time for ONE turkey, let alone TWO!"],
"NoMoney" : ["Me: I can't afford this!"],
"BuyTurkeyFirst" : ["Me: I should buy a turkey first!"],
"BrokenLight" : ["Me: The oven light appears to be broken..."],
"EmptyOven" : ["Me: The oven is already preheated..."],
"PaintStory" : ["Brother: Hey Grandpa, I've got a funny story about that primer you gave me",
"Grandpa: You'll have to remind me, again, my memory isn't too good in my old age",
"Brother: Well, you gave me some primer to redo my room.",

117
js/ui.js

@ -52,8 +52,8 @@ function OvenUI( stage, gameState ){ @@ -52,8 +52,8 @@ function OvenUI( stage, gameState ){
this.ovenDoor = OVEN_CLOSED;
// Important Model
var ovenModel = new OvenModel( 8, gameState );
// Important Model, dummy placeholder
var ovenModel = { secondTick:function(){} };
var ovenLight = new createjs.Shape();
ovenLight.graphics.beginFill( "black" ).drawCircle( 181, 126, 2 );
@ -113,43 +113,59 @@ function OvenUI( stage, gameState ){ @@ -113,43 +113,59 @@ function OvenUI( stage, gameState ){
this.changeTemperature = function( direction ){
if( temperatureText.text == "OFF" && direction == "Up" ) temperatureText.text = "125";
if( !( temperatureText.text == "OFF" && direction == "Down" ) ){
if( gameState.turkeyBought ){
if( temperatureText.text == "OFF" && direction == "Up" ) temperatureText.text = "125";
if( !( temperatureText.text == "OFF" && direction == "Down" ) ){
var temp = ( direction == "Up" ? parseInt(temperatureText.text)+25 : parseInt(temperatureText.text)-25);
var temp = ( direction == "Up" ? parseInt(temperatureText.text)+25 : parseInt(temperatureText.text)-25);
// Check lower bound for OFF
temp = temp < 150 ? temp = "OFF" : temp;
// Check lower bound for OFF
temp = temp < 150 ? temp = "OFF" : temp;
// Check upper bound
// if over 1100 F, burn house down
if( temp > 1100 ){
console.log("You have died in a fire");
return;
}
// Check upper bound
// if over 1100 F, burn house down
if( temp > 1100 ){
console.log("You have died in a fire");
return;
}
temperatureText.text = temp;
}
temperatureText.text = temp;
}
// Tell our model to set the actual temperature
ovenModel.changeTemp( UtilityFunctions.F2C( temperatureText.text == "OFF" ? 125 : parseInt( temperatureText.text ) ) );
// Tell our model to set the actual temperature
ovenModel.changeTemp( UtilityFunctions.F2C( temperatureText.text == "OFF" ? 125 : parseInt( temperatureText.text ) ) );
}
else{
gameState.pubsub.publish("ShowDialog",{seq:"EmptyOven", autoAdvance: true});
}
}
this.ovenLightToggle = function(){
lightPressedImg.alpha = lightPressedImg.alpha == 0 ? 1 : 0;
if( that.ovenDoor == OVEN_CLOSED){
doorClosedLightOn.alpha = lightPressedImg.alpha == 0 ? 0 : 1;
doorClosedLightOff.alpha = lightPressedImg.alpha == 0 ? 1 : 0;
doorOpen.alpha = 0;
}
else if( that.ovenDoor == OVEN_PEEK ){
doorPeekLightOn.alpha = lightPressedImg.alpha == 0 ? 0 : 1;
doorPeekLightOff.alpha = lightPressedImg.alpha == 0 ? 1 : 0;
doorOpen.alpha = 0;
// Only work if the user bought an oven light
if( gameState.boughtOvenLight ){
if( that.ovenDoor == OVEN_CLOSED){
doorClosedLightOn.alpha = lightPressedImg.alpha == 0 ? 0 : 1;
doorClosedLightOff.alpha = lightPressedImg.alpha == 0 ? 1 : 0;
doorOpen.alpha = 0;
}
else if( that.ovenDoor == OVEN_PEEK ){
doorPeekLightOn.alpha = lightPressedImg.alpha == 0 ? 0 : 1;
doorPeekLightOff.alpha = lightPressedImg.alpha == 0 ? 1 : 0;
doorOpen.alpha = 0;
}
}else{
gameState.pubsub.publish( "ShowDialog", {seq:"BrokenLight", autoAdvance:true} );
}
}
this.startTurkeyModel = function(){
console.log("weight is" + gameState.turkeyWeight)
ovenModel = new OvenModel( gameState.turkeyWeight, gameState );
}
var handleBar = new createjs.Shape();
handleBar.graphics.beginFill("#ffffff").drawRect(20, 190, 300, 20);
handleBar.alpha = 0.5;
@ -164,11 +180,17 @@ function OvenUI( stage, gameState ){ @@ -164,11 +180,17 @@ function OvenUI( stage, gameState ){
doorPeekLightOn.alpha = doorClosedLightOn.alpha = 0;
doorPeekLightOff.alpha = doorClosedLightOff.alpha = 0;
doorOpen.alpha = 1;
handleBar.y = 330;
handleBar.graphics.clear();
handleBar.graphics.beginFill("#ffffff").drawRect(5, 450, 400, 60);
handleBar.alpha = 0.5;
gameState.pubsub.publish( "Play", "Oven_Door_Full_Open" );
}else if (that.ovenDoor == OVEN_OPEN ){
that.ovenDoor = OVEN_PEEK;
gameState.pubsub.publish( "Play", "Oven_Door_Full_Close" );
handleBar.graphics.clear();
handleBar.graphics.beginFill("#ffffff").drawRect(20, 190, 300, 20);
handleBar.alpha = 0.5;
ovenPeek();
}
}
@ -198,10 +220,19 @@ function OvenUI( stage, gameState ){ @@ -198,10 +220,19 @@ function OvenUI( stage, gameState ){
handleBar.y = 0;
}
}
// Show core temperature
this.showTempDialog = function(){
state = ovenModel.getTurkeyState();
gameState.pubsub.publish( "ShowDialog", {seq:"custom", autoAdvance:false, customText:"Hmm.. the core temperature of the turkey is " + UtilityFunctions.C2F(state.core.temp).toFixed(2) + " F" } );
}
// change temperature, this one's for the UI
gameState.pubsub.subscribe( "ChangeTemperature", this.changeTemperature );
gameState.pubsub.subscribe( "ShowTempDialog", this.showTempDialog );
gameState.pubsub.subscribe( "OvenLightToggle", this.ovenLightToggle );
gameState.pubsub.subscribe( "OvenLight", this.changeOvenLight );
gameState.pubsub.subscribe( "StartTurkeyModel", this.startTurkeyModel );
this.secondTick = function(){
@ -228,6 +259,7 @@ function OvenUI( stage, gameState ){ @@ -228,6 +259,7 @@ function OvenUI( stage, gameState ){
panFront.alpha = 1;
for(i in turkeyStates){
stage.addChild(turkeyStates[i]);
}
stage.addChild(panFront);
}
@ -243,6 +275,8 @@ function OvenUI( stage, gameState ){ @@ -243,6 +275,8 @@ function OvenUI( stage, gameState ){
stage.addChild( new Button( stage, gameState, 45, 163, 41, 17, "ChangeTemperature", "Up" ) );
stage.addChild( new Button( stage, gameState, 95, 163, 41, 17, "ChangeTemperature", "Down" ) );
stage.addChild( new Button( stage, gameState, 145, 163, 41, 17, "OvenLightToggle", "" ) );
if( gameState.hard == false )
stage.addChild( new Button( stage, gameState, 220, 120, 50, 50, "SkipTime", "" ) );
stage.addChild( handleBar);
return this;
}
@ -293,7 +327,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou @@ -293,7 +327,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou
mouseOver.visible = false;
mouseOut.visible = true;
gameState.pubsub.publish("ClearClipboard", {});
} );
} );
mouseOutKitchen.addEventListener( "mouseover", function(){
@ -317,17 +351,30 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou @@ -317,17 +351,30 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou
mouseOutKitchen.visible = true;
} );
// We've bought the item, now we click it in the Kitchen
mouseOverKitchen.addEventListener("click",function(){
if ( that.name.indexOf("Temperature") != -1 ){
gameState.pubsub.publish( "ShowTempDialog", "" );
}
});
mouseOver.addEventListener( "click", function(){
if(!that.bought && cost <= gameState.wallet ){
console.log(that.name);
if( that.name.indexOf("Turkey") != -1 && gameState.turkeyBought != true){
gameState.turkeyBought = true;
gameState.turkeyWeight = weight;
gameState.marketItems[ that.name ].delete();
gameState.pubsub.publish("Play", {name:"Buy", volume:0.7} );
gameState.pubsub.publish("WalletAmount", gameState.wallet - Math.abs(cost))
gameState.pubsub.publish("StartTurkeyModel","");
}
// can we buy this? Only possible if you already bought a turkey
else if( that.name.indexOf("Turkey") == -1 && gameState.turkeyBought == true ){
// if we bought an oven light, enable it!
if( that.name.indexOf("Light") != -1 ) gameState.boughtOvenLight = true;
gameState.purchasedItems.push( objReturn );
gameState.marketItems[ that.name ].delete();
that.bought = true;
@ -336,17 +383,17 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou @@ -336,17 +383,17 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou
}
// One turkey only
else if( that.name.indexOf("Turkey") != -1 && gameState.turkeyBought == true ){
gameState.pubsub.publish( "ShowDialog", {seq:"CannotBuyTurkey", autoAdvance:false} );
gameState.pubsub.publish( "ShowDialog", {seq:"CannotBuyTurkey", autoAdvance:true} );
gameState.pubsub.publish( "Play", "Error" );
}
// Buy turkey first
else{
gameState.pubsub.publish( "ShowDialog", {seq:"BuyTurkeyFirst", autoAdvance:false} );
gameState.pubsub.publish( "ShowDialog", {seq:"BuyTurkeyFirst", autoAdvance:true} );
gameState.pubsub.publish( "Play", "Error" );
}
}
else{
gameState.pubsub.publish( "ShowDialog", {seq:"NoMoney", autoAdvance:false} );
gameState.pubsub.publish( "ShowDialog", {seq:"NoMoney", autoAdvance:true} );
gameState.pubsub.publish( "Play", "Error" );
}
});
@ -358,8 +405,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou @@ -358,8 +405,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou
delete: function( stage ){
gameState.pubsub.publish("RemoveItems", [mouseOut, mouseOver]);
// replace image with transparency
delete gameState.marketItems[that.name];
},
draw: function( stage, newx, newy ){
if( newx && newy ){
@ -369,6 +415,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou @@ -369,6 +415,7 @@ function MarketItem( gameState, name, x, y, cost, mouseOutImg, mouseOverImg, mou
if( gameState.newScreen == "KitchenScreen" ){
stage.addChild( mouseOutKitchen );
mouseOverKitchen.visible = false;
stage.addChild( mouseOverKitchen );
return;
}
@ -415,7 +462,7 @@ function Button( stage, gameState, x_orig, y_orig, x_dest, y_dest, eventCmd, arg @@ -415,7 +462,7 @@ function Button( stage, gameState, x_orig, y_orig, x_dest, y_dest, eventCmd, arg
var button = new createjs.Shape();
button.graphics.beginFill("#ffffff").drawRect(x_orig, y_orig, x_dest, y_dest);
button.alpha = 0.5;
button.alpha = 0.1;
button.addEventListener( "click", function(){
gameState.pubsub.publish( "Play", "Click" );
if( !altfunc ){

BIN
res/people/.DS_Store vendored

Binary file not shown.

BIN
res/people/Boyfriend.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
res/people/Brother.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 60 KiB

BIN
res/people/Cat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
res/people/Characters/.DS_Store vendored

Binary file not shown.

BIN
res/people/Characters/Boyfriend.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
res/people/Characters/Brother.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
res/people/Characters/Cat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
res/people/Characters/Dad.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
res/people/Characters/Girlfriend.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
res/people/Characters/Grandma.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
res/people/Characters/Grandpa.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
res/people/Characters/Mom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
res/people/Dad.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
res/people/Girlfriend.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
res/people/Grandma.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
res/people/Grandpa.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
res/people/Mom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
res/screens/.DS_Store vendored

Binary file not shown.
Loading…
Cancel
Save