예제 #1
0
 public void StartTimer()
 {
     if (tickTime <= 0)
     {
         return;
     }
     this.enabled = true;
     tickable.Tick(false);
     currentTicks++;
 }
예제 #2
0
 void UpdateTickable(ITickable tickable)
 {
     //using (ProfileBlock.Start("{0}.Tick()".With(tickable.GetType().Name())))
     {
         tickable.Tick();
     }
 }
예제 #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);
            }
        }
예제 #4
0
        void UpdateTickable(ITickable tickable)
        {
#if PROFILING_ENABLED
            using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name())))
#endif
            {
                tickable.Tick();
            }
        }
예제 #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());
         }
     }
 }
예제 #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}");
                }
            }
        }
예제 #7
0
 void UpdateTickable(ITickable tickable)
 {
     #if PROFILING_ENABLED
     using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name())))
     #endif
     {
         tickable.Tick();
     }
 }
예제 #8
0
 void UpdateTickable(ITickable tickable)
 {
     using (ProfileBlock.Start("{0}.Tick()".Fmt(tickable.GetType().Name())))
     {
         tickable.Tick();
     }
 }
예제 #9
0
 void ITickable.Tick(ulong tick, GameTime time)
 {
     this.Start();
     tickable.Tick(tick, time);
     this.End();
 }