Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. class Timer{
  2. float Time;
  3.  
  4. //creating a constructor for my timer
  5. Timer(float set){
  6. Time = set;
  7. }
  8.  
  9. //gets the current time
  10. float getTime(){
  11. return(Time);
  12. }
  13.  
  14. //set the timer to whatever I want it to count down from
  15. void settheTime(float set){
  16. Time = set;
  17. }
  18.  
  19. //make the timer count down instead of up so time is running out until the game is over
  20. void countDown(){
  21. Time -= 1/frameRate;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement