mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-21 09:46:04 +08:00
39 lines
765 B
C#
39 lines
765 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
|
|
/// <summary>
|
|
/// base class for generic Quaternion props
|
|
/// </summary>
|
|
public abstract class AbstractQuaternionTweenProperty : AbstractTweenProperty
|
|
{
|
|
protected Transform _target;
|
|
|
|
protected Quaternion _originalEndValue;
|
|
protected Quaternion _startValue;
|
|
protected Quaternion _endValue;
|
|
|
|
public AbstractQuaternionTweenProperty()
|
|
{}
|
|
|
|
|
|
public AbstractQuaternionTweenProperty( Quaternion endValue, bool isRelative = false ) : base( isRelative )
|
|
{
|
|
_originalEndValue = endValue;
|
|
}
|
|
|
|
|
|
public override bool validateTarget( object target )
|
|
{
|
|
return target is Transform;
|
|
}
|
|
|
|
|
|
public override void prepareForUse()
|
|
{
|
|
if (_isRelative && !_ownerTween.isFrom)
|
|
_endValue = _startValue * _endValue;
|
|
}
|
|
|
|
}
|