NGUI监听事件
using UnityEngine; using System.Collections; public class UIDataHandler : MonoBehaviour { public UIInput nameInput; public UIInput psInput; public GameObject loginBtn; public GameObject registerBtn; public UILabel tipLabel; void Start () { //侦听按钮事件 UIEventListener.Get(loginBtn).onClick = clickHandler; UIEventListener.Get(registerBtn).onClick = clickHandler; } void clickHandler(GameObject go) { if(go.name=="loginButton") { Debug.Log("登录:" + nameInput.label.text + "," + psInput.label.text); tipLabel.text = "用户名:" + nameInput.label.text + ",密码:" + psInput.label.text; } if (go.name == "registerButton") { Debug.Log("注册:"+nameInput.label.text + "," + psInput.label.text); tipLabel.text = "用户名:" + nameInput.label.text + ",密码:" + psInput.label.text; } } void Update () { } }
http://bbs.taikr.com/thread-2003-1-1.html
NGUI系列教程十(Scroll View实现触摸滚动相册效果)
http://www.cnblogs.com/martianzone/p/3383698.html
Unity NGUI弧形血条的制作
http://www.cnblogs.com/vitah/p/3922257.html
NGUI研究院之制作转圈的技能CD特效(八)
http://www.xuanyusong.com/archives/2399