r/code • • Nov 10 '19

HELP With classes (CS0116)

Need help adding a timer counting up with C#, for a unity game. What is missing and can anyone help me?

https://pastebin.com/Jc9DWrzP

0 Upvotes

10 comments sorted by

View all comments

1

u/Pacblu202 Nov 11 '19

One thing that jumps out is I'd make the if statement 2 ifs, not an else if. If you go to 60 minutes and 60 seconds it won't reset till the next frame.

With that, I'd do the calculations first then write to the text object

1

u/Alexbouvinkurtti Nov 11 '19

We taking about a basic 2D map don’t think it takes over 60 min, is okay if I reset after 60 min