7533人加入学习
(77人评价)
Dotween API详解及动效插件(Unity 2017.3)

制作完成于2018-12-14

价格 免费

给相机挂载脚本

 //Camera camera = GetComponent<Camera>();
        ////改变屏幕的宽高比
        //camera.DOAspect(0.5f,2);
        ////改变颜色
        //camera.DOColor(Color.red,2);

 

  //启用协程
        StartCoroutine(ChangeColor());

    }
    /// <summary>
    ///  创建协程方法
    /// </summary>
    IEnumerator ChangeColor() {
        Camera camera = GetComponent<Camera>();
        //这个颜色是渐变的,时间越长效果突出
        camera.DOColor(Color.red, 0.1f);
        yield return new WaitForSeconds(0.1f);
        camera.DOColor(Color.blue, 5);
        yield return new WaitForSeconds(5);
        camera.DOColor(Color.red, 0.1f);
        yield return new WaitForSeconds(0.1f);
        camera.DOColor(Color.blue, 5);
    }//近切面
        camera.DONearClipPlane(2,2);
        //远切面
       // camera.DOFarClipPlane(2,2);

[展开全文]

授课教师

课程特色

下载资料(1)
视频(45)