Itween笔记(第三节)

来源:互联网 发布:黑马java 全套百度云 编辑:程序博客网 时间:2024/06/05 03:18

Itween关于动画执行的补充.


iTween.CameraFadeFrom(iTween.Hash("amount", 1f, "time", 2f));


在两秒结束后.


iTween.CameraFadeFrom(iTween.Hash("amount", 1f, "time", 2f, "oncomplete", "ItweenTest", "oncompletetarget",this.gameObject, "oncompleteparams","nihao"));

oncomplete 动画执行完毕后,调用ItweenTest

oncompletetarget 提供方法的对象.

oncompleteparams 方法的参数.


    void ItweenTest(string str)
    {
        Debug.Log(str);
    }


最后结果就是动画执行完毕后打印出 nihao .


还有类似的一些,

onstart   动画刚开始执行的时候,调用某个方法.

onstarttarget  提供方法的对象.

onstartparams 方法的参数.


onupdate 动画执行时, 每帧执行某个方法.

onupdatetarget 提供方法的对象

onupdateparams 方法的参数.



delay 延迟多少秒开始播放动画


looptype 循环的类型.


easetype  变化类型.

0 0
原创粉丝点击