You could use Time.time http://docs.unity3d.com/Documentation/ScriptReference/Time-time.html
Let's say in your game, every second counts as a day. You could use Time.time to check how many seconds have gone by, and use that to see if the time was at a certain point.
An extremely simple example would be:
private float weeksSinceLastPayUp = 0;
private float daysSinceLastPayUp = 0;
private float TimePassed = 0;
void Update()
{
daysSinceLastPayUp = Time.time - TimePassed
weeksSinceLastPayUp = days / 7;
if(weeksSinceLastPayUp >= 4)
{
this.points += 10;
TimePassed += daysSinceLastPayUp;
daysSinceLastPayUp = 0;
weeksSinceLastPayUp = 0;
}
↧