Example #1
0
 /// <summary>
 /// Adds a frame object containng rotations of each limb to the move.
 /// </summary>
 public void RecordFrame()
 {
     if (move == null)
     {
         return;
     }
     if (move.GetCurrentNbrOfFrames() < move.GetTotalNbrOfFrames())
     {
         Frame frame = GetCurrentPoseFrame();
         UpdateFrameTwistLimits();
         onionMovePlayer.FrameToCharacter(frame);
         move.AddFrame(frame);
         UpdateProgressBar();
         if (move.GetCurrentNbrOfFrames() >= move.GetTotalNbrOfFrames() / 2 && reverseOnWayBack)
         {
             ReverseFrames();
             FinishMove();
         }
         else if (move.GetCurrentNbrOfFrames() >= (move.GetTotalNbrOfFrames() - 1) && !reverseOnWayBack)
         {
             move.AddFrame(move.GetFrames() [0]);                   //Add start frame to end of move as well.
             FinishMove();
         }
     }
 }