public void ScaleTo(Vector3 from, Vector3 to, float time, SA_EaseType easeType = SA_EaseType.linear) { transform.localScale = from; FinalVectorValue = to; SA_iTween.ScaleTo(gameObject, SA_iTween.Hash("scale", to, "time", time, "easeType", easeType.ToString(), "oncomplete", "onTweenComplete", "oncompletetarget", gameObject)); }
public void RotateTo(Vector3 from, Vector3 to, float time, SA_EaseType easeType = SA_EaseType.linear) { transform.rotation = Quaternion.Euler(from); FinalVectorValue = to; SA_iTween.RotateTo(gameObject, SA_iTween.Hash("rotation", to, "time", time, "easeType", easeType.ToString(), "oncomplete", "onTweenComplete", "oncompletetarget", gameObject)); }
public void VectorTo(Vector3 from, Vector3 to, float time, EaseType easeType = EaseType.linear) { transform.position = from; FinalVectorValue = to; SA_iTween.MoveTo(gameObject, SA_iTween.Hash("position", to, "time", time, "easeType", easeType.ToString(), "oncomplete", "onTweenComplete", "oncompletetarget", gameObject)); }
//-------------------------------------- // Public Methods //-------------------------------------- public void ValueTo(float from, float to, float time, SA_EaseType easeType = SA_EaseType.linear) { Vector3 pos = transform.position; pos.x = from; transform.position = pos; FinalFloatValue = to; SA_iTween.MoveTo(gameObject, SA_iTween.Hash("x", to, "time", time, "easeType", easeType.ToString(), "oncomplete", "onTweenComplete", "oncompletetarget", gameObject)); }