一:制作UI对象
1、先制作进度条progressbar (一个空物体,包含3个sprite图片),
添加设置Progress Bar脚本
2、给thumb设置Privot,使之移动角度和方向看起来更合适些
3、给thumb添加动画Sprite Animation
二:写上脚本代码
主要是对Progress的value值进行改写
using UnityEngine;
using System.Collections;
public class ProgressSC : MonoBehaviour {
public float _duration = 10f;
UIProgressBar _progress;
void Start () {
_progress = GetComponent<UIProgressBar> ();
}
void Update () {