public void InitView(GameObject cdButton, CUIFormScript formScript)
        {
            if (formScript == null)
            {
                return;
            }
            this.m_formScript = formScript;
            SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

            if (curLvelContext == null)
            {
                return;
            }
            if (this.IsMultiGame())
            {
                this.m_shortcutChat = new InBattleShortcut();
                this.m_shortcutChat.CacheForm(formScript, true, false);
                this.m_InputChat = new InBattleInputChat();
                this.m_InputChat.Init(formScript);
            }
            else if (curLvelContext.IsGameTypeAdventure() || curLvelContext.IsGameTypeBurning() || curLvelContext.IsGameTypeArena() || curLvelContext.IsGameTypeComBat())
            {
                this.m_shortcutChat = new InBattleShortcut();
                this.m_shortcutChat.CacheForm(formScript, false, true);
            }
            else if (cdButton != null)
            {
                cdButton.CustomSetActive(false);
            }
        }
Exemplo n.º 2
0
        public void Init(GameObject obj)
        {
            this.m_Obj = obj;
            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext.IsMobaMode() || curLvelContext.IsGameTypeGuide() || curLvelContext.IsGameTypeBurning() || curLvelContext.IsGameTypeArena())
            {
                this.Hide();
                return;
            }
            this.Show();
            this.bPanelOpen = false;
            this.taskPanel  = this.m_Obj.transform.Find("TaskPanel").gameObject;
            this.arrowIcon  = this.m_Obj.transform.Find("Image").gameObject;
            this.taskPanel.CustomSetActive(false);
            this.PanelIcon = this.m_Obj.transform.Find("icon").GetComponent <Image>();
            this.initEvent();
            UT.If_Null_Error <GameObject>(this.m_Obj);
            UT.If_Null_Error <GameObject>(this.taskPanel);
            UT.If_Null_Error <Image>(this.PanelIcon);
        }