自己写个tween

  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);
    }

 

posted @ 2015-11-10 09:42  哎呦不能错喔  阅读(204)  评论(0编辑  收藏  举报