Beispiel #1
0
        public void notify()
        {
            if (myIsPaused == true)
            {
                return;
            }

            myFrameTime    = TimeSource.timeThisFrame() * myTimeScale;
            myCurrentTime += myFrameTime;
            foreach (Timer t in myTimers)
            {
                if (t.notify() == false)
                {
                    releaseTimer(t);
                }
            }

            //remove any old timers
            foreach (Timer t in myReleaseTimers)
            {
                myTimers.Remove(t);
            }

            myReleaseTimers.Clear();
        }
Beispiel #2
0
 internal Clock(double setTime)
 {
     myTimeScale   = 1.0;
     myIsPaused    = false;
     myPauseTime   = 0.0;
     myCurrentTime = setTime;
     myFrameTime   = TimeSource.timeThisFrame();
 }
Beispiel #3
0
 public Clock()
 {
     myTimeScale   = 1.0;
     myIsPaused    = false;
     myPauseTime   = 0.0;
     myCurrentTime = TimeSource.defaultClock.currentTime();
     myFrameTime   = TimeSource.timeThisFrame();
 }