public override void onShowed()
        {
            instance = this;
            // getGameObjectByPath("linePanel").SetActive(false);
            firstRun = true;
            tab.setSelectedIndex(1, true);
            TickMgr.instance.addTick(tick);
            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
            GRMap.GAME_CAMERA.SetActive(false);
            m_goWorldmap.transform.FindChild("map/box_dxc").gameObject.SetActive(false);
            m_goWorldmap.transform.FindChild("map/box_ahsd").gameObject.SetActive(false);

            if (InterfaceMgr.getInstance().worldmap == true)
            {
                // m_goWorldmap.SetActive(true);

                //Debug.LogError("tttt");
                //changetab(0);
                tab.setSelectedIndex(0);
                //goTabrole.SetActive(false);
                //transform.FindChild("tab/world").gameObject
                //transform.FindChild("tab/world").GetComponent<Button>().interactable = true;
                //transform.FindChild("tab/map").GetComponent<Button>().interactable = false;
                //tab.create(getGameObjectByPath("tab"), gameObject, 0, 0, true);
                InterfaceMgr.getInstance().worldmap = false;
            }
            UiEventCenter.getInstance().onWinOpen(uiName);
        }
 public override void onClosed()
 {
     if (a3_active.instance != null)
     {
         if (a3_active.instance.map_light)
         {
             a3_active.instance.map_light = false;
         }
     }
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
     GRMap.GAME_CAMERA.SetActive(true);
     m_goWorldmap.transform.DOKill();
     TickMgr.instance.removeTick(tick);
     instance = null;
     mapid    = 0;
     base.onClosed();
 }
        public override void init()
        {
            _instance = this;
            ditu      = getComponentByPath <Text>("shijieditu");
            // PlayerModel.SendPosition();
            m_goWorldmap = getGameObjectByPath("worldmap");
            //vecBegin = m_goWorldmap.transform.position;
            //vecEnd = vecBegin;
            //vecEnd.y = 600f;
            //m_goWorldmap.transform.position = vecEnd;
            m_goMapcon = getGameObjectByPath("mapcon");

            btclose         = new BaseButton(getTransformByPath("btclose"));
            btclose.onClick = onClose;

            btGoCity         = new BaseButton(getTransformByPath("tabrole/gotomain"));
            btGoCity.onClick = onGotoCity;

            GameObject temp = getGameObjectByPath("tabrole/temp");

            temp.SetActive(false);
            tempH       = temp.GetComponent <RectTransform>().sizeDelta.y;
            npcList     = new ItemList(getTransformByPath("tabrole/npcmain"), 0, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            monsterList = new ItemList(getTransformByPath("tabrole/monstermain"), 1, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            wayList     = new ItemList(getTransformByPath("tabrole/waymain"), 2, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            goTabrole   = getGameObjectByPath("tabrole");

            tick = new TickItem(onUpdate);

            tab = new TabControl();
            tab.onClickHanle = ontab;

            tab.create(getGameObjectByPath("tab"), gameObject, 0, 0);



            goP   = getGameObjectByPath("mapcon/p");
            goP1  = getGameObjectByPath("mapcon/icon");
            goP22 = transform.FindChild("worldmap/icon").gameObject;
            //BaseButton btnChangeLine = new BaseButton(getTransformByPath("tabrole/btnChangeLine"));
            //btnChangeLine.onClick = onBtnChangeLineClick;


            initWorldMap();



            if (m_goMapcon.activeInHierarchy && TeamProxy.getInstance().MyTeamData != null)
            {
                teampos();
            }
            //resfreshTeamPos();
            mapRotation = Quaternion.Euler(0f, 0f, 0f);


            getComponentByPath <Text>("tab/world/Text").text = ContMgr.getCont("worldmap_0");
            getComponentByPath <Text>("tab/map/Text").text   = ContMgr.getCont("worldmap_1");
            getComponentByPath <Text>("tabrole/monstermain/way/Text").text     = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/monstermain/monster/Text").text = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/npcmain/way/Text").text         = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/npcmain/monster/Text").text     = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/waymain/way/Text").text         = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/waymain/monster/Text").text     = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/gotomain/Text").text            = ContMgr.getCont("worldmap_4");
            getComponentByPath <Text>("tabrole/btnChangeLine/Text").text       = ContMgr.getCont("worldmap_5");
            getComponentByPath <Text>("worldmap/title/Text").text = ContMgr.getCont("worldmap_6");
            getComponentByPath <Text>("worldmap/name").text       = ContMgr.getCont("worldmap_7");
            getComponentByPath <Text>("shijieditu").text          = ContMgr.getCont("worldmap_7");
            transform.SetAsLastSibling();
        }