Example #1
0
        void updLogic_TickEvent(object sender, Updater.DeltaEventArgs e)
        {
            TimeSpan deltaTimer = new TimeSpan(DateTime.Now.Ticks - lastTimerTick);

            lastTimerTick = DateTime.Now.Ticks;
            this.Invoke((MethodInvoker)(() => { this.OnTick(deltaTimer.TotalSeconds); }));
        }
Example #2
0
        void updDraw_TickEvent(object sender, Updater.DeltaEventArgs e)
        {
            TimeSpan deltaDraw = new TimeSpan(DateTime.Now.Ticks - lastDrawTick);

            lastDrawTick = DateTime.Now.Ticks;
            this.Invoke((MethodInvoker)(() => { this.OnDraw(deltaDraw.TotalSeconds); }));
        }