void playTween()
{
//use this Tween is so ease!
_tween = new Tween(this, 2, 0)
.equation.inOutCubic //set equation
.transform.position.to(to1) //position tween
.equation.sin //set new equation
.transform.localPosition.x.filter(2.5f) //filt transform.localPosition.x by sin
.equation.inSine //set new equation
.transform.localEulerAngles.y.to(360) //do a 360 rotation
.ShowOnStart()
.HideOnComplete() //hide this game object when the tween is complete
.OnStart(onStart) //handle the start event
.OnComplete(onComplete) //handle the complete event
.play(); //play this tween
}
RNTween code example
最新推荐文章于 2023-11-30 16:37:38 发布