示例#1
0
		private void SetupAnimation(PuzzleMove move, TimeSpan totalGameTime, int endMoveIndex)
		{
			isAnimating = true;
			_puzzleAnimationDirection = move.Direction;
			_puzzlePiecesMoving = move.MovingPieces;
			
			_animationPercent = 0;
			_animationStart = totalGameTime;
			_animationEnd = totalGameTime.Add(_animationLength);

			_animationStartModelPosition = GetCenteringVector(move.StartingState);
			var nonNormalizedEndPosition = move.GetEndingState();
			_animationEndModelPosition = GetCenteringVector(nonNormalizedEndPosition);

			_animationEndMoveIndex = endMoveIndex;

		}
示例#2
0
        public bool Equals(PuzzleMove other)
        {
            if (other == null)
            {
                return false;
            }

            return other.StartingState == StartingState &&
                other.GetEndingState() == GetEndingState();
        }