Beispiel #1
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 #2
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);
        }