using FairyGUI; public class Joystick : EventDispatcher
靠代码显示界面,把FGUI自带的button状态切换去掉
joystickButton = mainUI.GetChild("Joystick").asButton; joystickButton.changeStateOnClick = false;
FGUI支持的事件收发类
{ public class EventDispatcher : IEventDispatcher { public EventDispatcher(); public void AddEventListener(string strType, EventCallback1 callback); public void AddEventListener(string strType, EventCallback0 callback); public bool BroadcastEvent(string strType, object data); public bool BubbleEvent(string strType, object data); public bool DispatchEvent(string strType); public bool DispatchEvent(string strType, object data); public bool DispatchEvent(string strType, object data, object initiator); public bool DispatchEvent(EventContext context); public void RemoveEventListener(string strType, EventCallback1 callback); public void RemoveEventListener(string strType, EventCallback0 callback); public void RemoveEventListeners(); public void RemoveEventListeners(string strType); } }