Ejemplo n.º 1
0
 public a3BaseLegion(BaseShejiao win, string pathStr) : base(win.getTransformByPath("s4/" + pathStr))
 {
     string[] array = pathStr.Split(new char[]
     {
         '/'
     });
     this.pathStrName = array[Mathf.Max(0, array.Length - 1)];
     this.main        = (win as a3_legion);
     this.init();
 }
Ejemplo n.º 2
0
 public void SetIndexToFriend()
 {
     if (friend == null)
     {
         GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_friend");
         GameObject panel  = GameObject.Instantiate(prefab) as GameObject;
         friend = new a3_friend(panel.transform);
         friend.setPerent(con);
     }
     current = friend;
 }
Ejemplo n.º 3
0
        public void SetIndexToFriend()
        {
            bool flag = this.friend == null;

            if (flag)
            {
                GameObject original   = Resources.Load <GameObject>("prefab/a3_friend");
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
                this.friend = new a3_friend(gameObject.transform);
                this.friend.setPerent(this.con);
            }
            this.current = this.friend;
        }
Ejemplo n.º 4
0
 public a3_legion_diary(BaseShejiao win, string pathStr) : base(win, pathStr)
 {
 }
Ejemplo n.º 5
0
        private void OnSwitch(TabControl t)
        {
            int  seletedIndex = t.getSeletedIndex();
            bool flag         = this.current != null;

            if (flag)
            {
                bool flag2 = this.currentTeam != null && this.teamList != null;
                if (flag2)
                {
                    this.currentTeam.onClose();
                    this.currentTeam.gameObject.SetActive(false);
                    this.teamList.onClose();
                    this.teamList.gameObject.SetActive(false);
                }
                this.current.onClose();
                this.current.gameObject.SetActive(false);
            }
            bool flag3 = seletedIndex == 0;

            if (flag3)
            {
                bool flag4 = this.legion == null;
                if (flag4)
                {
                    GameObject original   = Resources.Load <GameObject>("prefab/a3_legion");
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
                    this.legion = new a3_legion(gameObject.transform);
                    this.legion.setPerent(this.con);
                    this.legion.transform.localPosition = Vector3.zero;
                }
                this.current = this.legion;
            }
            else
            {
                bool flag5 = seletedIndex == 1;
                if (flag5)
                {
                    this.SetIndexToFriend();
                }
                else
                {
                    bool flag6 = this.currentTeam == null;
                    if (flag6)
                    {
                        GameObject original2   = Resources.Load <GameObject>("prefab/a3_currentTeamPanel");
                        GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(original2);
                        this.currentTeam = new a3_currentTeamPanel(gameObject2.transform);
                        this.currentTeam.setPerent(this.con);
                    }
                    bool flag7 = this.teamList == null;
                    if (flag7)
                    {
                        GameObject original3   = Resources.Load <GameObject>("prefab/a3_teamPanel");
                        GameObject gameObject3 = UnityEngine.Object.Instantiate <GameObject>(original3);
                        this.teamList = new a3_teamPanel(gameObject3.transform);
                        this.teamList.setPerent(this.con);
                    }
                    bool flag8 = BaseProxy <TeamProxy> .getInstance().joinedTeam&& BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

                    if (flag8)
                    {
                        this.current = this.currentTeam;
                        this.currentTeam.gameObject.SetActive(true);
                        this.teamList.gameObject.SetActive(false);
                    }
                    else
                    {
                        this.current = this.teamList;
                        this.currentTeam.gameObject.SetActive(false);
                        this.teamList.gameObject.SetActive(true);
                    }
                    BaseProxy <TeamProxy> .getInstance().SetTeamPanelInfo();
                }
            }
            bool flag9 = this.current != null;

            if (flag9)
            {
                this.current.onShowed();
                this.current.visiable = true;
            }
        }
Ejemplo n.º 6
0
 public a3_legion_member(BaseShejiao win, string pathStr) : base(win, pathStr)
 {
 }
Ejemplo n.º 7
0
        private void OnSwitch(TabControl t)
        {
            int index = t.getSeletedIndex();

            if (current != null)
            {
                if (currentTeam != null && teamList != null)
                {
                    currentTeam.onClose();
                    currentTeam.gameObject.SetActive(false);
                    teamList.onClose();
                    teamList.gameObject.SetActive(false);
                }

                current.onClose();
                current.gameObject.SetActive(false);
            }

            if (index == 0)
            {
                if (legion == null)
                {
                    GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_legion");
                    GameObject panel  = GameObject.Instantiate(prefab) as GameObject;
                    legion = new a3_legion(panel.transform);
                    legion.setPerent(con);
                    legion.transform.localPosition = Vector3.zero;
                }
                current = legion;
            }
            else if (index == 1)
            {
                SetIndexToFriend();
            }
            else
            {
                if (currentTeam == null)
                {
                    GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_currentTeamPanel");
                    GameObject panel  = GameObject.Instantiate(prefab) as GameObject;
                    currentTeam = new a3_currentTeamPanel(panel.transform);
                    currentTeam.setPerent(con);
                }
                if (teamList == null)
                {
                    GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_teamPanel");
                    GameObject panel  = GameObject.Instantiate(prefab) as GameObject;
                    teamList = new a3_teamPanel(panel.transform);
                    teamList.setPerent(con);
                }
                if (TeamProxy.getInstance().joinedTeam&& TeamProxy.getInstance().MyTeamData != null)
                {
                    current = currentTeam;
                    currentTeam.gameObject.SetActive(true);
                    teamList.gameObject.SetActive(false);
                }
                else
                {
                    current = teamList;
                    currentTeam.gameObject.SetActive(false);
                    teamList.gameObject.SetActive(true);
                }
                TeamProxy.getInstance().SetTeamPanelInfo();
            }

            if (current != null)
            {
                current.onShowed();
                current.visiable = true;
            }
        }