/// <summary> /// Initializes a new instance of the <see cref="Move3DByAnimation" /> class. /// </summary> /// <param name="targetObject">The target object.</param> /// <param name="targetVector">The target position of the object.</param> ///´<param name="speed">The total movement speed.</param> public Move3DToAnimation(IAnimatableObjectPosition targetObject, Vector3 targetVector, MovementSpeed speed) : base(targetObject) { _targetObject = targetObject; _targetVector = targetVector; _paramMoveSpeed = speed; }
/// <summary> /// Initializes a new instance of the <see cref="Move3DByAnimation" /> class. /// </summary> /// <param name="targetObject">The target object.</param> /// <param name="targetVector">The target position of the object.</param> /// <param name="duration">The duration.</param> public Move3DToAnimation(IAnimatableObjectPosition targetObject, Vector3 targetVector, TimeSpan duration) : base(targetObject) { _targetObject = targetObject; _targetVector = targetVector; _paramDuration = duration; }
/// <summary> /// Initializes a new instance of the <see cref="Move3DByAnimation"/> class. /// </summary> /// <param name="targetObject">The target object.</param> /// <param name="moveVector">The move vector.</param> /// <param name="moveSpeed">The speed which is used for movement calculation.</param> public Move3DByAnimation(IAnimatableObjectPosition targetObject, Vector3 moveVector, MovementSpeed moveSpeed) : base(targetObject) { m_targetObject = targetObject; m_moveVector = moveVector; m_moveHelper = new MovementAnimationHelper(moveSpeed, moveVector); // Switch animation to fixed-time type base.ChangeToFixedTime(m_moveHelper.MovementTime); }
/// <summary> /// Initializes a new instance of the <see cref="Move3DByAnimation" /> class. /// </summary> /// <param name="targetObject">The target object.</param> /// <param name="moveVector">The move vector.</param> /// <param name="duration">The duration.</param> public Move3DByAnimation(IAnimatableObjectPosition targetObject, Vector3 moveVector, TimeSpan duration) : base(targetObject) { _targetObject = targetObject; _moveVector = moveVector; _moveHelper = new MovementAnimationHelper( new MovementSpeed(moveVector, duration), moveVector); // Switch animation to fixed-time type this.ChangeToFixedTime(_moveHelper.MovementTime); }