Coding Timer

I decided that a time slider would be a lot better than a count down clock. The player will be unable to actually know how long they have left but will clearly know that it is the time they have left by to position of the bar. I made the timer using GUI, text and images. The text pops up after the time is up saying the game is over. At the end of the code sets the game time to 0. This ends the game. In the future I will make it so it loads an ending scene displaying a high score. Currently it just stops the game and says game over.

Timer SS.PNG

In the code I made reference to the timer slider by referencing the game object as a public variable. I then set the public game object as a button which is basically temporary box that is being used as a place holder as I am currently waiting on one of the artists to make a pretty timer bar.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s