예제 #1
0
 /// <summary>
 /// change the object style and location according to the new values.
 /// </summary>
 /// <param name="values"></param>
 public void NewSample(float values)
 {
     try
     {
         if (ChildAnimationMovingAveEnable)
         {
             values = MovingAvrage.Clock(values, ChildAnimationMovingAveLength);
         }
         if (values > 0.9f)
         {
             values = 1;
         }
         device.BeginLayerDraw(0);
         //! Select the scenario.
         curScenario.NewSample(values);
     }
     catch (Exception ex)
     {
         xPFT.Exceptions.ExceptionHandler.LogError(ex);
     }
     finally
     {
         if (device != null)
         {
             device.EndLayerDraw(0);
             device.Present();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// The xPFT.ChildAnimation's class Contructor.
 /// create an object and initialize the component and scene.
 /// </summary>
 public ChildAnimation()
 {
     try
     {
         InitializeComponent();
         InitializeDevice();
         InitializeScene();
         MovingAvrage.Reset();
     }
     catch (Exception ex)
     {
         xPFT.Exceptions.ExceptionHandler.LogError(ex);
     }
 }
예제 #3
0
 /// <summary>
 /// Reset the Child animation.
 /// </summary>
 public void Reset()
 {
     MovingAvrage.Reset();
     ballonAndBirdScenario.Reset();
     appleAndBirdScenario.Reset();
 }