标签:http io ar sp on art log bs cti
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
标签:http io ar sp on art log bs cti
原文地址:http://www.cnblogs.com/zhaoyier/p/4152120.html