コード例 #1
0
 ////@Override
 public override void start()
 {
     if (mStarted)
     {
         return;
     }
     mStarted  = true;
     mLastTime = SystemClock.UptimeMillis();
     mChoreographer.RemoveFrameCallback(mFrameCallback);
     mChoreographer.PostFrameCallback(mFrameCallback);
 }
コード例 #2
0
 public ChoreographerAndroidSpringLooper(Choreographer choreographer)
 {
     mChoreographer = choreographer;
     mFrameCallback = new XFrameCallBack()
     {
         doFrame = (frameTimeNanos) =>
         {
             if (!mStarted || mSpringSystem == null)
             {
                 return;
             }
             long currentTime = SystemClock.UptimeMillis();
             mSpringSystem.loop(currentTime - mLastTime);
             mLastTime = currentTime;
             mChoreographer.PostFrameCallback(mFrameCallback);
         }
     };
 }