17650人加入学习
(59人评价)
强大的UI编辑器 - FairyGUI入门教程

制作于2018年1月25日

价格 免费

FairyGUI事件收发的类:EventDispatcher

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);
    }
}

 

[展开全文]

授课教师

SiKi学院老师

课程特色

图文(1)
视频(38)
下载资料(1)

学员动态

小雪aaa 开始学习 00-课程演示
小雪aaa 加入学习
维C123 加入学习
xiaopenyouaiU 加入学习