// Start is called before the first frame update void Start() { juicer = new Juicer(this); startPos = this.transform.position; juicer.TweenPosition(this.gameObject, endPos, animationCurve, duration, tweenComplete); }
// Update is called once per frame void Update() { if (Input.GetKeyDown("f")) { transform.position = startPos; juicer.TweenPosition(this.gameObject, endPos, animationCurve, duration, tweenComplete); } }