Esempio n. 1
0
    protected override void OnAwakeInitUI()
    {
        mUIMainModel = UIModelMgr.Instance.GetModel <UIMainModel>();

        mChatInput = CacheTrans.FindComponent <UIInput>("Root/ContainerBottom/ChatInput");
        CacheTrans.GetUIEventListener("Root/BtnClose").onClick += OnCloseClick;
        CacheTrans.GetUIEventListener("Root/ContainerBottom/BtnSend").onClick += OnSendInfoClick;

        mSimpleChatItems = CacheTrans.FindChindComponents <UIButton>("Root/ContainerCenter");
        Array.ForEach <UIButton>(mSimpleChatItems, p => { UIEventListener.Get(p.gameObject).onClick += OnSendCommonInfoClick; });
    }
Esempio n. 2
0
 protected override void OnAwakeInitUI()
 {
     mUIGameModel = UIModelMgr.Instance.GetModel <UIGameModel>();
     CacheTrans.GetUIEventListener("Root/ContainerBottom/BtnReturn").onClick += OnSingleGameEndClick;
     mSingleEndItems = CacheTrans.FindChindComponents <SingleSettlementItem>("Root/ContainerCenter");
     mCurrCardItem   = CacheTrans.FindComponent <CardItem>("Root/ContainerTop/CurrCardItem");
     mHandCardItem   = CacheTrans.FindComponent <HandCardGroupItem>("Root/ContainerTop/HandCards");
     if (mHandCradGroupItems == null)
     {
         mHandCradGroupItems = new List <HandCardGroupItem>();
     }
     mHandCradGroupItems.Add(CacheTrans.FindComponent <HandCardGroupItem>("Root/ContainerTop/HandCardGroup/CardGroup0"));
     mHandCradGroupItems.Add(CacheTrans.FindComponent <HandCardGroupItem>("Root/ContainerTop/HandCardGroup/CardGroup1"));
     mHandCradGroupItems.Add(CacheTrans.FindComponent <HandCardGroupItem>("Root/ContainerTop/HandCardGroup/CardGroup2"));
     mHandCradGroupItems.Add(CacheTrans.FindComponent <HandCardGroupItem>("Root/ContainerTop/HandCardGroup/CardGroup3"));
     mGameResult = CacheTrans.FindComponent <UISprite>("Root/ContainerTop/GameResult");
     mLabelHuDes = CacheTrans.FindComponent <UILabel>("Root/ContainerTop/LabelHuDes");
 }
Esempio n. 3
0
    protected override void OnAwakeInitUI()
    {
        _instance = this;

        if (mUIGameModel == null)
        {
            mUIGameModel = UIModelMgr.Instance.GetModel <UIGameModel>();
            mUIGameModel.ValueUpdateEvent += OnValueUpdateEvent;
        }

        if (mUIMainModel == null)
        {
            mUIMainModel = UIModelMgr.Instance.GetModel <UIMainModel>();
        }
        mPublicGroupMgr = CacheTrans.FindComponent <PublicGroupMgr>("Root/PublicGroup");
        mLabelSeqCount  = CacheTrans.FindComponent <UILabel>("Root/PublicGroup/RunGroup/LabelSeqCount");
        mLabelCardNum   = CacheTrans.FindComponent <UILabel>("Root/PublicGroup/RunGroup/LabelCardNum");
        mGameTableItem  = CacheTrans.FindComponent <GameTableItem>("Root/PublicGroup/RunGroup/GameTable");

        mRecordControl = CacheTrans.FindComponent <RecordControl>("Root/PublicGroup/RunGroup/RecordControl");

        mJingCardItems = CacheTrans.FindChindComponents <CardItem>("Root/PublicGroup/RunGroup/ContainerTop/JingCards");
        mOpenCardItems = CacheTrans.FindChindComponents <CardItem>("Root/PublicGroup/RunGroup/OpenCardItems");

        if (mPlayerItems == null)
        {
            mPlayerItems = new List <PlayerInfoItem>();
        }

        mPlayerItems.Add(CacheTrans.FindComponent <PlayerInfoItem>("Root/ContainerBottom/PlayerInfo"));
        mPlayerItems.Add(CacheTrans.FindComponent <PlayerInfoItem>("Root/ContainerRight/PlayerInfo"));
        mPlayerItems.Add(CacheTrans.FindComponent <PlayerInfoItem>("Root/ContainerTop/PlayerInfo"));
        mPlayerItems.Add(CacheTrans.FindComponent <PlayerInfoItem>("Root/ContainerLeft/PlayerInfo"));

        if (mPlayerCardGroupList == null)
        {
            mPlayerCardGroupList = new List <PlayerCardGroupItem>();
        }
        mPlayerCardGroupList.Add(CacheTrans.FindComponent <PlayerCardGroupItem>("Root/ContainerBottom/PlayerCardGroup"));
        mPlayerCardGroupList.Add(CacheTrans.FindComponent <PlayerCardGroupItem>("Root/ContainerRight/PlayerCardGroup"));
        mPlayerCardGroupList.Add(CacheTrans.FindComponent <PlayerCardGroupItem>("Root/ContainerTop/PlayerCardGroup"));
        mPlayerCardGroupList.Add(CacheTrans.FindComponent <PlayerCardGroupItem>("Root/ContainerLeft/PlayerCardGroup"));
        mVoiceAnimation = CacheTrans.FindComponent <UISpriteAnimation>("Root/PublicGroup/VoiceAnimation");

        #region 注册按钮的点击方法

        mBtnDissolveRoom = CacheTrans.FindComponent <UIButton>("Root/PublicGroup/PrepareGroup/ContainerRight/BtnDissolveRoom");
        mBtnLeaveRoom    = CacheTrans.FindComponent <UIButton>("Root/PublicGroup/PrepareGroup/ContainerRight/BtnLeaveRoom");
        UIEventListener.Get(mBtnDissolveRoom.gameObject).onClick += OnDissolveRoomClick;
        UIEventListener.Get(mBtnLeaveRoom.gameObject).onClick    += OnDissolveRoomClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/PrepareGroup/ContainerRight/BtnReturnHall").onClick += OnReturnHallClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/PrepareGroup/BtnWeChat").onClick                += OnWeChatClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/RunGroup/ContainerRight/BtnSetting").onClick    += OnSettingClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/RunGroup/ContainerRight/BtnTextChat").onClick   += OnChatClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/RunGroup/ContainerRight/BtnExpression").onClick += OnExpressionClick;
        CacheTrans.GetUIEventListener("Root/PublicGroup/ContainerRight/BtnVoiceChat").onPress           += OnRecording;

        #endregion 注册按钮的点击方法

        SetVoiceAnimation(false);
    }
Esempio n. 4
0
 protected override void OnAwakeInitUI()
 {
     CacheTrans.GetUIEventListener("Root/ContainerBottom/BtnShare").onClick += OnShareClick;
     mWholeEndItems = CacheTrans.FindChindComponents <GameSettlementItem>("Root/ContainerCenter");
     CacheTrans.GetUIEventListener("Root/ContainerBottom/BtnReturn").onClick += OnWholeGameEndClick;
 }