void Update() { if (executeInEditor) { if (_timeHelper == null) { _timeHelper = TimeHelper.Create(); } _timeHelper.Update(); var dt = _timeHelper.DeltaTime + _timeResidue; var fixedDelta = Time.fixedDeltaTime; var nSteps = Mathf.FloorToInt(dt / fixedDelta); _timeResidue = dt - nSteps * fixedDelta; nSteps = Mathf.Min(100, nSteps); for (var i = 0; i < nSteps; i++) { _physics.FixedUpdate(fixedDelta); } } else { _timeHelper = null; } }
void Update() { if (time.GetMillisecs() > 750) { SpawnBox(); time = TimeHelper.Create(); } }
void Start() { SpawnBox(); time = TimeHelper.Create(); }
void Start() { timer = TimeHelper.Create(); }