/// <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(); } } }
/// <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); } }
/// <summary> /// Reset the Child animation. /// </summary> public void Reset() { MovingAvrage.Reset(); ballonAndBirdScenario.Reset(); appleAndBirdScenario.Reset(); }