Пример #1
0
 public PotaTween SetEaseEquation(Ease.Equation easeEquation)
 {
     EaseEquation    = easeEquation;
     EasingReference = EasingReference.Equation;
     easeMethod      = System.Type.GetType("Ease").GetMethod(EaseEquation.ToString());
     return(this);
 }
Пример #2
0
        protected void Awake()
        {
            if ((Curve == null || Curve.keys.Length <= 1) && EasingReference != EasingReference.Equation)
            {
                EasingReference = EasingReference.Equation;
                EaseEquation    = Ease.Equation.Linear;
            }

            easeMethod = System.Type.GetType("Ease")?.GetMethod(EaseEquation.ToString());

            _colorProperty = "_Color";
            GetRenderers();

            _rigidbody   = GetComponent <Rigidbody>();
            _rigidbody2D = GetComponent <Rigidbody2D>();

            _startPosition = OwnTransform.position;
            _startRotation = OwnTransform.eulerAngles;
            _startScale    = OwnTransform.localScale;
        }
Пример #3
0
 public PotaTween SetCurve(AnimationCurve curve)
 {
     Curve           = curve;
     EasingReference = EasingReference.Curve;
     return(this);
 }