Esempio n. 1
0
        private UISprite sprite_Result;//输赢结果

        public override void Init(PanelType type)
        {
            Transform[] childs = GetComponentsInChildren <Transform>();
            foreach (Transform item in childs)
            {
                if (item.name == "MJ")
                {
                    item.gameObject.SetActive(false);
                }
            }

            _MJ_Mgr = GetComponentInChildren <MJ_Manager>();
            _MJ_Mgr.Init();

            label_time    = GameUtility.FindDeepChild(gameObject, "时间").GetComponent <UILabel>();
            label_当前玩法    = GameUtility.FindDeepChild(gameObject, "当前玩法").GetComponent <UILabel>();
            sprite_Result = GameUtility.FindDeepChild(gameObject, "Result").GetComponent <UISprite>();

            playeInfos = GetComponentsInChildren <PlayerInfo_GameOver>(true);
            foreach (PlayerInfo_GameOver item in playeInfos)
            {
                item.Init(_MJ_Mgr);
            }

            base.Init(type);
            AddColliderMode(PanelColliderMode.Normal);

            EventInit();
        }
Esempio n. 2
0
        public override void Init(PanelType type)
        {
            if (MJ_CPG_START_TRANS)
            {
                MJ_CPG_START_TRANS.gameObject.SetActive(false);
            }
            if (MJ_IN_START_TRANS)
            {
                MJ_IN_START_TRANS.gameObject.SetActive(false);
            }
            if (MJ_OUT_START_TRANS)
            {
                MJ_OUT_START_TRANS.gameObject.SetActive(false);
            }
            base.Init(type);
            ShowPanelDirectly();

            _MJMgr = GetComponentInChildren <MJ_Manager>();
            _MJMgr.Init();

            EventInit();
            AnimsInit();
            PlayerInfoInit();

            ChatMsg_Dialogue_Obj = GameUtility.FindDeepChild(gameObject, "ChatMsg_Dialogue").gameObject;
            ChatMsg_Face_Obj     = GameUtility.FindDeepChild(gameObject, "ChatMsg_Face").gameObject;
            ChatMsg_Dialogue_Obj.GetComponent <UISprite>().alpha = 0;
            ChatMsg_Face_Obj.GetComponent <UISprite>().alpha     = 0;

            ZhuangObj = GameUtility.FindDeepChild(gameObject, "Zhuang").gameObject;
            ShowZhuang(false);

            headIconSprite    = GameUtility.FindDeepChild(gameObject, "HeadIcon").GetComponent <UISprite>();
            label_Name        = GameUtility.FindDeepChild(gameObject, "Name").GetComponent <UILabel>();
            label_Coin        = GameUtility.FindDeepChild(gameObject, "Score").GetComponent <UILabel>();
            label_Geolocation = GameUtility.FindDeepChild(gameObject, "Geolocation").GetComponent <UILabel>();

            _player_中鱼 = GetComponentInChildren <Player_中鱼>();
            _player_中鱼.Init(_MJMgr);
        }