public void StartTimer() { if (tickTime <= 0) { return; } this.enabled = true; tickable.Tick(false); currentTicks++; }
void UpdateTickable(ITickable tickable) { //using (ProfileBlock.Start("{0}.Tick()".With(tickable.GetType().Name()))) { tickable.Tick(); } }
//protected override void Dispose(bool disposing) //{ // if (isDisposed) return; // if (disposing) // { // } // // isDisposed = true; //} /// <summary> /// /// </summary> /// <param name="totalTime"></param> /// <param name="elapsedTime"></param> /// <remarks>Do not access this Method directly. Only AetherEngine should call it during the game loop.</remarks> /// <permission cref=""></permission> public override void Tick(GameTime gameTime) { ITickable tickableRoot = Root as ITickable; if (tickableRoot != null) { tickableRoot.Tick(gameTime); } }
void UpdateTickable(ITickable tickable) { #if PROFILING_ENABLED using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name()))) #endif { tickable.Tick(); } }
private void Update() { using (List <ITickable> .Enumerator enumerator = this._ticked.GetEnumerator()) { while (enumerator.MoveNext()) { ITickable current = enumerator.get_Current(); current.Tick(Time.get_deltaTime()); } } }
private static void TickTickable(ITickable tickable) { while (tickable.RealTimeToTickThrough >= 0) { float timePerTick = tickable.TimePerTick(tickable.TimeSpeed); if (timePerTick == 0) { break; } tickable.RealTimeToTickThrough -= timePerTick; try { tickable.Tick(); } catch (Exception e) { Log.Error($"Exception during ticking {tickable}: {e}"); } } }
void UpdateTickable(ITickable tickable) { using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name()))) { tickable.Tick(); } }
void ITickable.Tick(ulong tick, GameTime time) { this.Start(); tickable.Tick(tick, time); this.End(); }