public static LTDescr AddRatio(this LTDescr descr, float ratioPassed) { float newPass = descr.passed + descr.time * ratioPassed; if (newPass > 0 && newPass < descr.time) { descr.updateNow(); } return(descr); }
void Start() { descr = LeanTween.move(go, new Vector3(0f,0,100f), 10f); descr.passed = 5f; // this should put it at the midway descr.updateNow(); descr.pause(); // doesn't matter if pause after or before setting descr.passed I think if I set the passed property and paused the next frame it would work // LeanTween.scale(go2, Vector3.one * 4f, 10f).setEasePunch(); LeanTween.scaleX (go2, (go2.transform.localScale * 1.5f).x, 15f).setEase (LeanTweenType.punch); LeanTween.scaleY (go2, (go2.transform.localScale * 1.5f).y, 15f).setEase (LeanTweenType.punch); LeanTween.scaleZ (go2, (go2.transform.localScale * 1.5f).z, 15f).setEase (LeanTweenType.punch); }
void Start() { descr = LeanTween.move(go, new Vector3(0f, 0, 100f), 10f); descr.passed = 5f; // this should put it at the midway descr.updateNow(); descr.pause(); // doesn't matter if pause after or before setting descr.passed I think if I set the passed property and paused the next frame it would work // LeanTween.scale(go2, Vector3.one * 4f, 10f).setEasePunch(); LeanTween.scaleX(go2, (go2.transform.localScale * 1.5f).x, 15f).setEase(LeanTweenType.punch); LeanTween.scaleY(go2, (go2.transform.localScale * 1.5f).y, 15f).setEase(LeanTweenType.punch); LeanTween.scaleZ(go2, (go2.transform.localScale * 1.5f).z, 15f).setEase(LeanTweenType.punch); }
public static LTDescr UpdateRatio(this LTDescr descr, float ratioPassed) { descr.passed = descr.time * ratioPassed; descr.updateNow(); return(descr); }