Exemple #1
0
 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();
     }
 }
Exemple #3
0
        //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);
            }
        }
Exemple #4
0
        void UpdateTickable(ITickable tickable)
        {
#if PROFILING_ENABLED
            using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name())))
#endif
            {
                tickable.Tick();
            }
        }
Exemple #5
0
 private void Update()
 {
     using (List <ITickable> .Enumerator enumerator = this._ticked.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ITickable current = enumerator.get_Current();
             current.Tick(Time.get_deltaTime());
         }
     }
 }
Exemple #6
0
        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}");
                }
            }
        }
Exemple #7
0
 void UpdateTickable(ITickable tickable)
 {
     #if PROFILING_ENABLED
     using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name())))
     #endif
     {
         tickable.Tick();
     }
 }
 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();
 }