//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Set Animation Position //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void SetPosition(float t) { m_ttTimer.SetTimerCompletionPercentage(t); if (m_bPositionChanging) { Target.localPosition = Vector3.Lerp(m_vStartingPosition, m_vEndPosition, t); } if (m_bRotationChanging) { Target.localRotation = Quaternion.Euler(Vector3.Lerp(m_vStartingRotation, m_vEndRotation, t)); } if (m_bScaleChanging) { Target.localScale = Vector3.Lerp(m_vStartingScale, m_vEndScale, t); } if (m_bColourChanging) { UpdateColour(m_cStartingColour, m_cEndColour, t); } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Set Animation Position //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void SetPosition(float t) { m_ttTimer.SetTimerCompletionPercentage(t); UpdateColour(m_cStartingColour, m_cEndColour, t); }