I've asked this on the forum, but haven't been given too much direction yet, hoping for some more information.
In my playerCollision file I set the variable when objects get picked up:
ScoreKeeper.temperatureAdjust = 5 ;
In my scorekeeper file I apply different textures and track the temperature, displaying a different picture with a higher temperature based on time minus the number from picked up objects that keep things cool.
static var temperatureAdjust : int = 0 ;
function Update ()
{
TemperatureUpdate();
}
function TemperatureUpdate ()
{
var temperature : int = (Time.time - temperatureAdjust) ;
if ((temperature >= 111 ) && (temperature <= 120))
{
guiTexture.texture = temperature12tex;
guiTexture.enabled = true ;
}
else if ((temperature >= 101 ) && (temperature <= 110))
{
guiTexture.texture = temperature11tex;
}
I'm not quite sure why the above isn't working. The the if statements continue in increments of 10, until it gets to zero, where the game begins.
This is basically an alternative to a timer, based on keeping down the temperature. I'm trying to figure out what might be wrong with this, and also if possible just scale the gui instead of using different textures, because it would be more accurate and require less images to load.
thanks for any help with this.