Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Timer{
- float Time;
- //creating a constructor for my timer
- Timer(float set){
- Time = set;
- }
- //gets the current time
- float getTime(){
- return(Time);
- }
- //set the timer to whatever I want it to count down from
- void settheTime(float set){
- Time = set;
- }
- //make the timer count down instead of up so time is running out until the game is over
- void countDown(){
- Time -= 1/frameRate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement