I'm trying to figure out how to passively increase values in other running functions every second. (trying to increase the scores every second in a clicker game)
public int score=0;
public int sps=0;
private static Thread th = new Thread(new ThreadStart(Tick));
public static void Tick()
{
score+=sps;
System.Threading.Thread.Sleep(1000);
}
Update: Thanks for the help the ticking mechanism works now. The last thing I'm struggling with is setting the labelScore.Text=Convert.toString(score);
since it's static. How could i get trough the static to be able to set my labelScore 's value?