protected override void Transition(float transitionPercentage)
        {
#if (StoreVersion)
            SetColour(TransitionalObject.Lerp(startColour, endColour, transitionPercentage));
#else
            SetColour(K2Maths.Lerp(startColour, endColour, transitionPercentage));
#endif
        }
Пример #2
0
        protected override void Transition(float transitionPercentage)
        {
            if (reverseNegativeRotations)
            {
#if StoreVersion
                Vector3 difference = FixRotations(endPoint - startPoint);                                                             //basically if any values are < 0 this inverts them properly
#else
                Vector3 difference = K2Maths.FixRotations(endPoint.localRotation.eulerAngles - startPoint.localRotation.eulerAngles); //basically if any values are < 0 this inverts them properly
#endif

                parent.transform.localEulerAngles = startPoint + difference * transitionPercentage;
            }
            else
            {
                parent.transform.localEulerAngles = startPoint + (endPoint - startPoint) * transitionPercentage;
            }
        }