示例#1
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            HelpOtherBtn              = t.GetComponent <UIButton>("Escort/HelpOtherBtn");
            TransferDartingFlag       = t.FindEx("Escort/EscortingFlag").gameObject;
            TranferDartCountdownLabel = t.GetComponent <UILabel>("Escort/EscortingFlag/Countdown");
            QueueSize = 50;

            t.GetComponent <UIButton>("Escort/HelpOtherBtn").onClick.Add(new EventDelegate(OnHandleOtherHelpReqBtnClick));
            t.GetComponent <UIEventTrigger>("Escort/EscortingFlag").onClick.Add(new EventDelegate(OnRequestHelpBtnClick));

            m_Instance     = this;
            m_MessageQueue = new EB.Collections.Queue <InvitesMessage>(QueueSize);

            var im = LTHotfixManager.GetManager <InvitesManager>();

            im.OnAcceptListener       += OnAcceptListener;
            im.OnRejectListener       += OnRejectListener;
            im.OnInviteListener       += OnInviteListener;
            im.OnRequestListener      += OnRequestListener;
            im.OnRemoveTargetListener += OnRemoveTargetListener;
            im.OnRemoveInviteListener += OnRemoveInviteListener;
        }
示例#2
0
        public override void OnDestroy()
        {
            m_Instance = null;

            var im = LTHotfixManager.GetManager <InvitesManager>();

            im.OnAcceptListener       -= OnAcceptListener;
            im.OnRejectListener       -= OnRejectListener;
            im.OnInviteListener       -= OnInviteListener;
            im.OnRequestListener      -= OnRequestListener;
            im.OnRemoveTargetListener -= OnRemoveTargetListener;
            im.OnRemoveInviteListener -= OnRemoveInviteListener;
        }