Reign.Core.Time.Update C# (CSharp) Méthode

Update() public méthode

public Update ( ) : void
Résultat void
        public void Update()
        {
            #if ANDROID
            long currentMilli = JavaSystem.CurrentTimeMillis();
            if (millisecond <= currentMilli) Delta += (((currentMilli - millisecond) / 1000f) - Delta) * .1f;
            millisecond = currentMilli;
            #elif NaCl || SILVERLIGHT
            long currentMilli = DateTime.Now.Millisecond;
            if (millisecond <= currentMilli) Delta += (((currentMilli - millisecond) / 1000f) - Delta) * .1f;
            millisecond = currentMilli;
            #elif SILVERLIGHT || VITA
            long currentMilli = stopWatch.ElapsedMilliseconds;
            Delta += ((currentMilli / 1000f) - Delta) * .1f;

            stopWatch.Reset();
            stopWatch.Start();
            #else
            Delta += ((stopWatch.ElapsedTicks / (float)(Stopwatch.Frequency)) - Delta) * .1f;
            #if XBOX360
            stopWatch.Reset();
            stopWatch.Start();
            #else
            stopWatch.Restart();
            #endif
            #endif

            Delta = (Delta > 1) ? 1 : Delta;
            Delta = (Delta < 0) ? 0 : Delta;

            ++fpsTic;
            seconds += Delta;
            if (seconds >= 1)
            {
                FPS = fpsTic;
                fpsTic = 0;
                seconds = 0;
            }
        }