Unity 利用NGUI2.6.3做技能冷却的CD效果
NGUI非常强大我们今天来学习一下,如何利用NGUI做技能冷却的CD效果。先导入NGUI的插件。没有的话这里有啊NGUI2.6.3下载地址: http://vdisk.weibo.com/s/KLqn5
创建一个plane,
然后,再创建一个sprite。
脚本代码与sprite相关联就OK了!
using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour {
UISprite sprite;
void Awake()
{
sprite = GetComponent<UISprite>();
}
void Update()
{
sprite.fillAmount -= 0.01f;
}
}

浙公网安备 33010602011771号