首页 > 其他 > 详细

自己写个tween

时间:2015-11-10 10:29:34      阅读:231      评论:0      收藏:0      [点我收藏+]
  public Vector3 begin,end;//起始终止坐标
    public float BtoE_time;//用时
    float timer,lerp;//计时器和进度值
    void Update ()
    {
        timer += Time.deltaTime;
        lerp = timer / BtoE_time;
        transform.position = Vector3.Lerp(begin,end,lerp);
    }

 

自己写个tween

原文:http://www.cnblogs.com/Feiyuzhu/p/4951963.html

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