Game Development Reference
In-Depth Information
{
if(achRndsW != 5)
achRndsW++;
}
if(Amount >= 100)
{
if(achRndsW != 6)
achRndsW = 6;
}
if(achRndsW == 6)
getRndsW = false;
}
}
Tracking the time played
This tracker will track how long the player played the game. Unity tracks time in
seconds; we will track the time stat in minutes, so we will be dividing the time by 60:
void TimePlayed(float Amount)
{
if(getTime)
{
float minutes = Amount / 60.00f;
if(minutes >= 10.00f && minutes < 59.00f)
{
if(achTime != 1)
achTime++;
}
if(minutes >= 60.00f && minutes < 119.00f)
{
if(achTime != 2)
achTime++;
}
if(minutes >= 120.00f && minutes < 179.00f)
Search WWH ::




Custom Search