摘要: 当值改变时,EZGUI允许通过AddValueChangedDelegate()方法控制事件的逻辑处理。代码:using UnityEngine;using System.Collections;public class Example : MonoBehaviour{ // The below references should be populated // by dragging the desired controls from // scene hierarchy onto these variables in // the inspector: // ... 阅读全文
posted @ 2012-08-20 16:58 Marble 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 大多数input控制都会通过一个代理的方法监听事件,在EZGUI中的input代理会用AddInputDelegate()方法去处理。举例首先,在脚本中定义一个代理的方法(必须用C#写,JS实现不了)void MyDelegate(ref POINTER_INFO ptr){ // Display a message in the console if // the pointer is dragged over the control: if(ptr.evt == POINTER_INFO.INPUT_EVENT.DRAG) Debug.Log("Dragged!");. 阅读全文
posted @ 2012-08-20 16:50 Marble 阅读(454) 评论(0) 推荐(0) 编辑