void Awake() { mPositionLerpTo = new LerpToVector2(this, mPositionLerpFactor); mRotationLerpTo = new LerpToVector2(this, mRotationLerpFactor) { Continuous = true }; mRotationLerpTo.InitLerp(-mRect.up, SetFacingDirection); }
private void Awake() { mCurrentLerps = new Dictionary <RectTransform, LerpToVector2>(); foreach (RectTransform transform in mLerpTransforms) { mCurrentLerps[transform] = new LerpToVector2(this, mLerpFactor) { Epsilon = mLerpEpsilon, }; } }