首页 > 编程语言 > 详细

Unity之一天一个技术点(十五)

时间:2015-02-04 16:36:45      阅读:282      评论:0      收藏:0      [点我收藏+]
给unity3d的老版动画中,添加事件的方法(测试通过):

 
       AnimationEvent event0 = new AnimationEvent();
       event0.time =this.animation["run"].length * 0.2f;
       event0.functionName ="xxx";
       event0.stringParameter="哈哈!";
       animation["run"].clip.AddEvent(event0);

    public void xxx(string ss)
    {
        Debug.Log(ss);
    }

Unity之一天一个技术点(十五)

原文:http://blog.csdn.net/myk7694503/article/details/43486929

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!