I'm using a normal texture sheet and scrolling it down so it has a 3, 2, 1, GO! animation. Unity Free doesn't support animated gifs, png, flv, flash animation, etc.
The problem is that I want an integer variable to be multiplied by the distance between two slides, like: Between countdown start (texture offset 0) to "3" is "y" (y=0.1650390625 in this case) pixels, 2*y is the distance between the 0 and "2", 3*y is the distance between 0 and "1", and so on until GO!. Each of those cycles are paused by one second. I didn't want to use continuous offset, rather a "jump to" action, that's why I didn't use the default Time systems and used the "for" loop... My teachers always suggested me to use for loops whenever I want to link the loop code with variating values that affect it. I use it all the time in MATLAB, but I guess it's not as stable in Unity...
I guess I found what's causing the problem: It's the yield WaitForSeconds(); pause function. But I don't know of any replacement for that. I wanted the script to pause 1 second after each loop...
No matter! I turned Time.time into an integer and it worked, sort of. I just have to sync it with the ship release.





Reply With Quote
