Quote:
Originally Posted by Ataros
if (Time.tickCounter() % 72000 == 72000) is wrong probably.
|
This will always result in FALSE. % gives you a remainder of division (Остаток от деления), so this operation will always give result greater or equal to 0 and less than divisor (assuming positive numbers).
Code:
if (Time.tickCounter() % 72000 == 0)
Will be TRUE every time tickCounter() returns multiple of 72000 (i.e. every time 72000 ticks pass, when counted from 0: 72000, 2*72000, 3*72000 and so on).