}
};
+ if (mModelRotateAnimation != null)
+ {
+ mModelRotateAnimation.Stop();
+ mModelRotateAnimation.Dispose();
+ mModelRotateAnimation = null;
+ }
+
mModelRotateAnimation = new Animation(modelRotateAnimationDurationMilliseconds);
mModelRotateAnimation.AnimateBy(mModel, "Orientation", new Rotation(new Radian(new Degree(360.0f)), Vector3.YAxis));
}
case "f":
{
- if (mModelAnimation?.State == Animation.States.Playing)
+ if (mModel != null && mModelLoadFinished)
{
- if (mModel != null && mModelLoadFinished)
+ if (mModelAnimation != null && mModelAnimation.State == Animation.States.Playing)
{
mMotionAnimation = mModel.GenerateMotionDataAnimation(mAnimateMotionData);
}
else if (e.Key.State == Key.StateType.Up)
{
- if (mModelAnimation?.State == Animation.States.Stopped)
+ if (mModelAnimation != null && mModelAnimation.State == Animation.States.Stopped)
{
if (mMotionAnimation != null)
{
public void Activate()
{
- mWindow = Window.Instance;
+ mWindow = Window.Default;
mWindow.BackgroundColor = Color.DarkOrchid;
mWindowSize = mWindow.WindowSize;