Example #1
0
        //小人跟随cube压缩往下移动
        public void PersonMoveDownAnimationWithCubeCompression()
        {
            if (CubeCompressionCount >= 90)
            {
                return;
            }

            Layer_Person.SetValue(Canvas.LeftProperty, 0d);
            Layer_Person.SetValue(Canvas.TopProperty, 756d + YofCubeCompressionMoveDown);
        }
Example #2
0
        //小人下落动画
        public void PersonFallAnimation()
        {
            double x      = (1d / playerFallAnimationFrames) * (playerFallAnimationFramesCounts + 1);
            double yvalue = 250 * BounceEaseOutFucntion(x);

            // Double Y = (250d / playerFallAnimationFrames) * (playerFallAnimationFramesCounts+1);//test用的,每帧线性下落距离
            Layer_Person.SetValue(Canvas.TopProperty, 506d + yvalue);
            playerFallAnimationFramesCounts++;
            if (playerFallAnimationFramesCounts == playerFallAnimationFrames - 1)
            {
                RunDrawStateNegative11EndFlag = true;
            }
            if (playerFallAnimationFramesCounts == playerFallAnimationFrames)
            {
                playerFallAnimationFramesCounts = 0;
            }
        }
Example #3
0
 //重置小人跟随cube压缩往下移动的参数
 public void RelaxAndResetParameterOfPersonMoveDown()
 {
     Layer_Person.SetValue(Canvas.LeftProperty, 0d);
     Layer_Person.SetValue(Canvas.TopProperty, 756d);
 }