Beispiel #1
0
        private void OnRollEndCallback()
        {
            this.m_bIsPlaying = false;
            if (this.m_curPlayingScroll != null)
            {
                this.m_curPlayingScroll.Loop--;
                if (this.m_curPlayingScroll.Loop == 0)
                {
                    ClassPoolModule <ScrollData> .Release(this.m_curPlayingScroll);

                    if (this.m_queueScrollDatas.Count > 0)
                    {
                        var scrollData = this.m_queueScrollDatas.Dequeue();
                        this.AddScrollBroadcast(scrollData);
                        this.StartRoll();
                    }
                    else
                    {
                        this.Show(false);
                        this.m_curPlayingScroll = null;
                    }
                }
                else
                {
                    //说明无限滚动或者次数没玩
                    this.StartRoll();
                }
            }
        }
Beispiel #2
0
        public int AddTimerTask(uint delay, uint frameCount, Action callback, bool loop = false)
        {
            var t = ClassPoolModule <TimerData> .Alloc();

            t = this.InitTimer(t, delay, frameCount, loop) as TimerData;
            t.SetCallback(callback);
            return(t.TimerId);
        }
Beispiel #3
0
 /// <summary>
 /// 清除对话资源
 /// </summary>
 public override void OnFinished()
 {
     this.m_iCurIndex = 0;
     //清除数据,然后关闭tip
     ClassPoolModule<NewbieHelpTipStep>.Release(this);
     UITipObj.SetVisiable(false);
     base.OnFinished();
 }
Beispiel #4
0
        /// <summary>
        /// 关闭事件压入队列
        /// </summary>
        /// <param name="nErrCode">关闭错误码</param>
        public void PushClosedEvent(NetErrCode nErrCode)
        {
            NetEvent evt = ClassPoolModule <NetEvent> .Alloc();

            evt.m_nEvtType = NetEvtType.Event_Closed;
            evt.m_nErrCode = nErrCode;
            m_queueEvent.Enqueue(evt);
        }
Beispiel #5
0
        public void PushReceiveEvent(int dataLen)
        {
            NetEvent evt = ClassPoolModule <NetEvent> .Alloc();

            evt.m_nEvtType = NetEvtType.Event_Receive;
            evt.m_dataLen  = dataLen;
            m_queueEvent.Enqueue(evt);
        }
Beispiel #6
0
        public int AddTimerTask <T>(uint delay, uint frameCount, Action <T> callback, T arg, bool loop = false)
        {
            var t = ClassPoolModule <TimerData <T> > .Alloc();

            t = this.InitTimer(t, delay, frameCount, loop) as TimerData <T>;
            t.SetCallback(callback);
            t.Arg = arg;
            return(t.TimerId);
        }
Beispiel #7
0
        public void AddScrollBroadcast(string info, int loop = 1)
        {
            var data = ClassPoolModule <ScrollData> .Alloc();

            data.Info = info;
            data.Loop = loop;
            this.AddScrollBroadcast(data);
            this.StartRoll();
        }
Beispiel #8
0
        public void PushConnectEvent(bool bSuccess)
        {
            var evt = ClassPoolModule <NetEvent> .Alloc();

            evt.m_nEvtType = NetEvtType.Event_Connect;
            evt.m_nErrCode = bSuccess ? NetErrCode.Net_NoError : NetErrCode.Net_SysError;
            m_queueEvent.Enqueue(evt);
            this.CanUpdate = bSuccess;
        }
Beispiel #9
0
 public override void OnFinished()
 {
     //Debug.Log("fwerwOnfishjed");
     CaomaoDriver.NewbieHelpModule.SetUIGlowTipNoVisiable();
     this.RemoveButtonListener();
     this.bt_activeButton = null;
     base.OnFinished();
     if (!(this is NewbieButtonWithContentStep))
     {
         ClassPoolModule <NewbieButtonNoContentStep> .Release(this);
     }
 }
Beispiel #10
0
        private void Awake()
        {
            if (this.m_anim == null)
            {
                this.m_anim = this.GetComponentInChildren <DOTweenAnimation>();
                this.m_anim.onComplete.AddListener(this.OnRollEndCallback);
                this.Show(false);
            }
            if (this.lb_content == null)
            {
                this.lb_content = this.GetComponentInChildren <Text>();
            }
            var rect = this.GetComponent <RectTransform>();

            this.m_curScrollBgWidth = rect.sizeDelta.x;
            this.preSecondWidth     = this.m_curScrollBgWidth / this.defalutTime;
            ClassPoolModule <ScrollData> .Init();
        }
Beispiel #11
0
        private NewbieHelpStep CreateNewbieHelpStep(NewbieHelpData data, int mainId)
        {
            NewbieHelpStep result = null;

            switch (data.NewbieType)
            {
            case ENewbieHelpType.ButtonClickWithContent:
                ClassPoolModule <NewbieButtonWithContentStep> .Init();

                result = ClassPoolModule <NewbieButtonWithContentStep> .Alloc();

                break;

            case ENewbieHelpType.ButtonClickNoContent:
                ClassPoolModule <NewbieButtonNoContentStep> .Init();

                result = ClassPoolModule <NewbieButtonNoContentStep> .Alloc();

                break;

            case ENewbieHelpType.CharacterTip:
                NewbieHelpTipStep.Init();
                ClassPoolModule <NewbieHelpTipStep> .Init();

                result = ClassPoolModule <NewbieHelpTipStep> .Alloc();

                break;
            }
            if (result != null)
            {
                result.MainID           = mainId;
                result.ID               = data.Id;
                result.ActionOnFinished = this.NextNewbieStep;
            }
            return(result);
        }
Beispiel #12
0
        public override void RecyleSelf(TimerBase data)
        {
            var d = data as TimerData;

            ClassPoolModule <TimerData> .Release(d);
        }
Beispiel #13
0
 public override void OnFinished()
 {
     base.OnFinished();
     UITip.SetVisiable(false);
     ClassPoolModule <NewbieButtonWithContentStep> .Release(this);
 }