예제 #1
0
 public override void OnAwake()
 {
     DiceTcpOperation = new GameDiceTcpRoomOperation();
     base.OnAwake();
     btn_Kick = XUIUtils.GetCompmentT <Button>(transform, "btn_Kick");
     XUIUtils.ListenerBtn(btn_Kick, BtnKickOnClick);
 }
예제 #2
0
    public override void OnAwake()
    {
        isClickLoginBtn = false;
        key             = "apiunmdw154sof65";
        iv = "asdf9a8fa2fs5sdf";
        GenerateKeyIv(out kv);
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        AddLoginCommand();
        btn_CloseWXLogin = XUIUtils.GetCompmentT <Button>(transform, "ThirdLogin/btn_Close");
        login            = XUIUtils.GetCompmentT <Transform>(transform, "login");
        versionTxt       = XUIUtils.GetCompmentT <Text>(transform, "versionsContentText");
        btn_WXLogin      = XUIUtils.GetCompmentT <Button>(transform, "login/WeChatLoginBtn");

        btn_Login  = XUIUtils.GetCompmentT <Button>(transform, "ThirdLogin/btn_Login");
        thirdLogin = XUIUtils.GetCompmentT <Transform>(transform, "ThirdLogin");

        XUIUtils.ListenerBtn(btn_CloseWXLogin, BtnCloseWXOnClick);
        XUIUtils.ListenerBtn(btn_WXLogin, BtnWXLoginOnClick);
        XUIUtils.ListenerBtn(btn_Login, BtnLoginOnClick);

        //btn_CloseWXLogin.onClick.AddListener(BtnCloseWXOnClick);

        //btn_WXLogin.onClick.AddListener(BtnWXLoginOnClick);
        //btn_Login.onClick.AddListener(BtnLoginOnClick);
        GameObject canvas = GameObject.Find("Canvas");

        loginByWX = canvas.AddComponent <UILoginByWX>();
        if (versionTxt != null)
        {
            versionTxt.text = Application.version;
        }
    }
예제 #3
0
    public override void OnAwake()
    {
        if (!isAwake)
        {
            //从表里读取礼物信息

            MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
            giftTable = ShopInit.Instance.GetShopCommodity(100);
            Transform trans = transform.Find("Items/Grid");
            giftNumberList = new Dictionary <int, Text>();
            btn_Pawn       = XUIUtils.GetCompmentT <Button>(transform, "btn_Pawn");
            XUIUtils.ListenerBtn(btn_Pawn, BtnPawnOnClick);
            for (int i = 0; i < giftTable.Count; i++)
            {
                GameObject go  = Resources.Load <GameObject>("Prefabs/Head/gift");
                GameObject obj = Instantiate(go);
                obj.name = "gift_" + i.ToString();
                string path   = "Sprite/Shop/gift/new_gift_" + i.ToString();
                Sprite sprite = Resources.Load <Sprite>(path);
                obj.transform.GetChild(1).GetComponent <Image>().sprite = sprite;
                obj.transform.SetParent(trans);
                obj.transform.localScale = Vector3.one;
                obj.transform.GetChild(2).GetComponent <Text>().text = giftTable[i].name;
                giftNumberList.Add(giftTable[i].id, obj.transform.GetChild(3).GetComponent <Text>());
            }
            canvas  = GameObject.Find("Canvas").transform;
            isAwake = true;
        }
    }
예제 #4
0
 public override void OnAwake()
 {
     MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
     base.OnAwake();
     startChangeCard          = true;
     changedStartPos          = new Vector3(270, 60, 0);
     exchangeExpend           = new int[] { 1, 2, 3 };
     currentCardIndex         = -1;
     currentExchangeCardCount = 0;
     exchangeTimes            = 1;
     changedCardList          = new List <Transform>();
     ChangeCard    = XUIUtils.GetCompmentT <Transform>(transform, "ChangeCard");
     btn_selfCards = new List <Button>();
     for (int i = 3; i < ChangeCard.childCount; i++)
     {
         btn_selfCards.Add(ChangeCard.GetChild(i).GetComponent <Button>());
     }
     btn_ChangeCard      = XUIUtils.GetCompmentT <Button>(transform, "btn_ChangeCard");
     btn_CloseChangeCard = XUIUtils.GetCompmentT <Button>(transform, "ChangeCard/btn_Close");
     XUIUtils.ListenerBtn(btn_ChangeCard, BtnChangeCardOnClick);
     XUIUtils.ListenerBtn(btn_CloseChangeCard, BtnCloseChangeCardOnClick);
     changedCard = XUIUtils.GetCompmentT <Transform>(transform, "Players/self/Player/ChangedCard");
     CardTrans   = XUIUtils.GetCompmentT <Transform>(transform, "Players/Cards");
     selfChangeCardParentTrans = transform.Find("Players/self/Player/ChangedCard");
     exchangeCardTxt           = XUIUtils.GetCompmentT <Text>(transform, "btn_ChangeCard/countImg/countTxt");
     for (int i = 0; i < btn_selfCards.Count; i++)
     {
         int j = i;
         btn_selfCards[i].onClick.AddListener(delegate() { this.BtnChangeCardOnClick(j); });
     }
 }
예제 #5
0
파일: UIBankPanel.cs 프로젝트: zglbig/eib-c
    public override void OnAwake()
    {
        if (!isAwake)
        {
            MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
            currentGoldTxt = XUIUtils.GetCompmentT <Text>(transform, "currentGold/Text");
            walletGoldTxt  = XUIUtils.GetCompmentT <Text>(transform, "bankGold/Text");
            totalGoldTxt   = XUIUtils.GetCompmentT <Text>(transform, "totalGold/Text");

            DepositInput = XUIUtils.GetCompmentT <InputField>(transform, "Deposit/InputField");
            ExtractInput = XUIUtils.GetCompmentT <InputField>(transform, "Extract/InputField");

            btn_Deposit = XUIUtils.GetCompmentT <Button>(transform, "Deposit/btn_Deposit");
            btn_Extract = XUIUtils.GetCompmentT <Button>(transform, "Extract/btn_Extract");

            btn_ExtractSub = XUIUtils.GetCompmentT <Button>(transform, "Extract/btn_Sub");
            btn_ExtractAdd = XUIUtils.GetCompmentT <Button>(transform, "Extract/btn_Add");
            btn_DepositSub = XUIUtils.GetCompmentT <Button>(transform, "Deposit/btn_Sub");
            btn_DepositAdd = XUIUtils.GetCompmentT <Button>(transform, "Deposit/btn_Add");
            XUIUtils.ListenerBtn(btn_Deposit, BtnDepositOnClick);
            XUIUtils.ListenerBtn(btn_Extract, BtnExtractOnClick);
            XUIUtils.ListenerBtn(btn_ExtractSub, BtnExtractSubOnClick);
            XUIUtils.ListenerBtn(btn_ExtractAdd, BtnExtractAddOnClick);
            XUIUtils.ListenerBtn(btn_DepositSub, BtnDepositSubOnClick);
            XUIUtils.ListenerBtn(btn_DepositAdd, BtnDepositAddOnClick);

            DepositInput.onValueChanged.AddListener(DepositInputValueChange);
            ExtractInput.onValueChanged.AddListener(ExtractInputValueChange);
            isAwake = true;
        }
    }
예제 #6
0
 // Use this for initialization
 void Awake()
 {
     btn_Confirm = XUIUtils.GetCompmentT <Button>(transform, "btn_Confirm");
     btn_Cancel  = XUIUtils.GetCompmentT <Button>(transform, "btn_Cancel");
     XUIUtils.ListenerBtn(btn_Confirm, BtnConfirmOnClick);
     XUIUtils.ListenerBtn(btn_Cancel, BtnCancelOnClick);
 }
예제 #7
0
    public override void OnAwake()
    {
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        //从表里读取礼物信息
        giftTable = ShopInit.Instance.GetShopCommodity(100);
        btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        Transform trans = transform.Find("Items/Grid");

        giftNumberList = new Dictionary <int, Text>();

        for (int i = 0; i < giftTable.Count; i++)
        {
            int        j   = i;
            GameObject go  = Resources.Load <GameObject>("Prefabs/Friend/sendGiftItem");
            GameObject obj = Instantiate(go);
            obj.name = "gift_" + i.ToString();
            string path   = "Sprite/Shop/gift/new_gift_" + i.ToString();
            Sprite sprite = Resources.Load <Sprite>(path);
            obj.transform.GetChild(1).GetComponent <Image>().sprite = sprite;
            obj.transform.SetParent(trans);
            obj.transform.localScale = Vector3.one;
            obj.transform.GetChild(2).GetComponent <Text>().text = giftTable[i].selling.ToString();
            //添加点击事件
            obj.transform.GetChild(1).gameObject.AddComponent <Button>().onClick.AddListener(delegate() { this.BtnSendGiftOnClick(giftTable[j].id); });

            giftNumberList.Add(giftTable[i].id, obj.transform.GetChild(2).GetComponent <Text>());
        }
    }
예제 #8
0
    public override void OnAwake()
    {
        //   ExcelUtils.Instance.init("Asset/Excel");
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        btn_Close   = XUIUtils.GetCompmentT <Button>(transform, "BackBtn");
        btn_Upgrade = XUIUtils.GetCompmentT <Button>(transform, "UpgradeBtn");
        btn_AddGold = XUIUtils.GetCompmentT <Button>(transform, "glodcountBg/PlusBtn");
        btn_Harvest = XUIUtils.GetCompmentT <Button>(transform, "HarvestBtn");


        slider = XUIUtils.GetCompmentT <Slider>(transform, "SlideImage");

        timer     = XUIUtils.GetCompmentT <Text>(transform, "SlideImage/time");
        level     = XUIUtils.GetCompmentT <Text>(transform, "SlideImage/Level");
        goldcount = XUIUtils.GetCompmentT <Text>(transform, "Treegather/goldcount");
        totalGold = XUIUtils.GetCompmentT <Text>(transform, "glodcountBg/Text");


        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_Upgrade, BtnUpgradeOnClick);
        XUIUtils.ListenerBtn(btn_AddGold, BtnAddGoldOnClick);
        XUIUtils.ListenerBtn(btn_Harvest, BtnHarvestOnClick);
        canvasGroup.blocksRaycasts = true;
        moneyTreeOperation         = new MoneyTreeOperation();
        MoneyTreeOpenDto moneyTreeOpenDto = moneyTreeOperation.open(PlayerCache.loginInfo.uid);

        if (moneyTreeOpenDto != null)
        {
            UpdateUI(moneyTreeOpenDto);
        }
    }
예제 #9
0
파일: UITipsPanel.cs 프로젝트: zglbig/eib-c
 public override void OnAwake()
 {
     MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
     btn_No     = XUIUtils.GetCompmentT <Button>(transform, "btn_No");
     btn_GoShop = XUIUtils.GetCompmentT <Button>(transform, "btn_Yes");
     XUIUtils.ListenerBtn(btn_No, BtnCloseOnClick);
     XUIUtils.ListenerBtn(btn_GoShop, BtnGoShopOnClick);
 }
예제 #10
0
 private void Awake()
 {
     btn_confirm = XUIUtils.GetCompmentT <Button>(transform, "btn_Ok");
     XUIUtils.ListenerBtn(btn_confirm, BtnConfirmOnClick);
     transform.localScale = Vector3.zero;
     transform.DOScale(Vector3.one, 0.2f);
     transform.SetAsLastSibling();
 }
예제 #11
0
    public override void OnAwake()
    {
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        btn_Confirm = XUIUtils.GetCompmentT <Button>(transform, "btn_Confirm");
        tipsContent = XUIUtils.GetCompmentT <Text>(transform, "content");

        XUIUtils.ListenerBtn(btn_Confirm, BtnConfirmOnClick);
    }
예제 #12
0
파일: UIRankPanel.cs 프로젝트: zglbig/eib-c
    public override void OnStart()
    {
        btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");

        //添加按钮点击事件

        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
    }
예제 #13
0
    public override void OnStart()
    {
        btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        btn_Get   = XUIUtils.GetCompmentT <Button>(transform, "btn_Pay");

        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_Get, BtnGetOnClick);
    }
예제 #14
0
 public override void OnStart()
 {
     btn_Close  = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
     btn_Search = XUIUtils.GetCompmentT <Button>(transform, "btn_Search");
     inputUID   = XUIUtils.GetCompmentT <InputField>(transform, "InputField");
     //添加按钮点击事件
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
     XUIUtils.ListenerBtn(btn_Search, BtnSearchOnClick);
 }
예제 #15
0
파일: PayTips.cs 프로젝트: zglbig/eib-c
 // Use this for initialization
 void Start()
 {
     btn_Failure = XUIUtils.GetCompmentT <Button>(transform, "btn_Failure");
     btn_Success = XUIUtils.GetCompmentT <Button>(transform, "btn_Success");
     btn_Close   = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
     XUIUtils.ListenerBtn(btn_Failure, BtnFailureOnClick);
     XUIUtils.ListenerBtn(btn_Success, BtnSuccessOnClcik);
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
 }
예제 #16
0
 // Use this for initialization
 public override void Awake()
 {
     base.Awake();
     rawImage    = XUIUtils.GetCompmentT <RawImage>(transform, "QRcode");
     OpenWxSaner = XUIUtils.GetCompmentT <Button>(transform, "SaveQRcode");
     XUIUtils.ListenerBtn(OpenWxSaner, GotoWxScner);
     btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
 }
예제 #17
0
    public void Awake()
    {
        btn_Refuse  = XUIUtils.GetCompmentT <Button>(transform, "btn_Refuse");
        btn_Confirm = XUIUtils.GetCompmentT <Button>(transform, "btn_Confirm");
        content     = XUIUtils.GetCompmentT <Text>(transform, "content");

        XUIUtils.ListenerBtn(btn_Refuse, BtnRefuseOnClick);
        XUIUtils.ListenerBtn(btn_Confirm, BtnConfirmOnClick);
    }
예제 #18
0
    // Use this for initialization
    private void Awake()
    {
        btn_Close  = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        btn_AliPay = XUIUtils.GetCompmentT <Button>(transform, "btn_AliPay");
        btn_WxPay  = XUIUtils.GetCompmentT <Button>(transform, "btn_WxPay");

        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_AliPay, BtnAliPayOnClick);
        XUIUtils.ListenerBtn(btn_WxPay, BtnWxPayOnClick);
    }
예제 #19
0
    public override void OnAwake()
    {
        base.OnAwake();

        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        btn_refresh = XUIUtils.GetCompmentT <Button>(transform, "btn_refresh");
        XUIUtils.ListenerBtn(btn_refresh, BtnRefreshOnClick);
        canvas   = GameObject.Find("Canvas").transform;
        posTrans = transform.Find("Items/ItemList").transform;
    }
예제 #20
0
    public override void OnAwake()
    {
        base.OnAwake();
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        inviteCodeInput = XUIUtils.GetCompmentT <InputField>(transform, "InputField");
        btn_Close       = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        btn_GetAward    = XUIUtils.GetCompmentT <Button>(transform, "btn_GetAward");

        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_GetAward, BtnGetAwardOnClick);
    }
예제 #21
0
    public override void OnAwake()
    {
        AwardList    = new List <RebateDialDataTable>();
        AwardImaList = new List <Sprite>();
        endtime      = 1f;
        AwardIndex   = 0;
        rolltimes    = 4;
        times        = 0;
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
        AwardPosList = new List <Transform>();
        //获取抽奖按钮添加点击事件
        drawBtn = XUIUtils.GetCompmentT <Button>(transform, "RebateRouletteBG/ExtractionBtn");
        XUIUtils.ListenerBtn(drawBtn, DrawOnclick);
        //获取返回按钮添加点击事件
        backBtn = XUIUtils.GetCompmentT <Button>(transform, "RebateRouletteBG/BackBtn");
        XUIUtils.ListenerBtn(backBtn, BackBtnOnClick);
        //获取奖品父物体
        extractionBG    = XUIUtils.GetCompmentT <Transform>(transform, "RebateRouletteBG/ExtractionBG");
        LightImageTrams = XUIUtils.GetCompmentT <Transform>(transform, "RebateRouletteBG/kuangImage");
        //给奖励物品链表赋值
        for (int i = 0; i < 8; i++)
        {
            RebateDialDataTable table = RebateDialDataTable.get(i + 1);
            AwardList.Add(table);
        }
        //给奖品位置链表赋值
        for (int i = 0; i < 8; i++)
        {
            //将所有奖励的tranform加入List
            AwardPosList.Add(extractionBG.GetChild(i));
            extractionBG.GetChild(i).GetChild(0).GetComponent <Image>().sprite = GameTools.Instance.GetSpriteAtlas("Sprite/StoreGoodsIma/StoreGoodsAtlas", AwardList[i].awardId.ToString());
            extractionBG.GetChild(i).GetChild(1).GetComponent <Text>().text    = AwardList[i].num.ToString();
        }

        //获取到万人争霸投注量
        wanrenBet = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/FirstWay/WanrenBet/wanrenBet");
        //获取到天天乐投注量
        daydayBet = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/FirstWay/DaydayBet/daydaybet");
        //获取到摇摇乐投注量
        teeterBet = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/FirstWay/TeeterBet/teeterbet");
        //获取到抽奖次数
        drawCount = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/ExtractionBtn/timeTxt");
        //总投注
        totalBet = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/FirstWay/TotalBet/totalbet");
        //已抽奖次数
        alreadyTimes = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/todayDoneTimes");
        TopUpNum     = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/SecondWay/TodayPayTotal/todayPayTotal");
        betcountText = XUIUtils.GetCompmentT <Text>(transform, "RebateRouletteBG/BET/betcountText");
        init();
        rebateDialOperation = new RebateDialOperation();
        rebateDialInfoDto   = rebateDialOperation.dialInfo(PlayerCache.loginInfo.uid);
        UpdateRebateRouletteData(rebateDialInfoDto);
    }
예제 #22
0
 public override void OnAwake()
 {
     MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
     btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
     userInfo  = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/userinfoPanel");
     carInfo   = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/carPanel");
     giftInfo  = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/giftPanel");
     daojuInfo = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/daojuPanel");
     userInfo.gameObject.AddComponent <DiceOtherPlayerInfo>();
     carInfo.gameObject.AddComponent <UIOtherPlayerCarPanel>();
     giftInfo.gameObject.AddComponent <UIOtherPlayerGiftPanel>();
     daojuInfo.gameObject.AddComponent <UIOtherPlayerDaojuPanel>();
 }
예제 #23
0
    public override void OnAwake()
    {
        userInfo  = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/userinfoPanel");
        carInfo   = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/carPanel");
        giftInfo  = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/giftPanel");
        daojuInfo = XUIUtils.GetCompmentT <Transform>(transform, "ToggleGroup/daojuPanel");

        userInfo.gameObject.AddComponent <UIOtherPlayerInfoPanel>();
        carInfo.gameObject.AddComponent <UIOtherPlayerCarPanel>();
        giftInfo.gameObject.AddComponent <UIOtherPlayerGiftPanel>();
        daojuInfo.gameObject.AddComponent <UIOtherPlayerDaojuPanel>();
        btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
    }
예제 #24
0
 public override void OnAwake()
 {
     chatPanelTrans       = XUIUtils.GetCompmentT <Transform>(transform, "ChatPanel");
     btn_QuickMsg         = XUIUtils.GetCompmentT <Button>(transform, "ChatPanel/btn_QuickMsg");
     btn_Expression       = XUIUtils.GetCompmentT <Button>(transform, "ChatPanel/btn_Expression");
     btn_SendMsg          = XUIUtils.GetCompmentT <Button>(transform, "ChatPanel/btn_SendMsg");
     QuickMsgPanelTrans   = XUIUtils.GetCompmentT <Transform>(transform, "ChatPanel/QuickMsgPanel");
     ExpressionPanelTrans = XUIUtils.GetCompmentT <Transform>(transform, "ChatPanel/ExpressionPanel");
     msgTxtContent        = XUIUtils.GetCompmentT <Text>(transform, "ChatPanel/MsgScrollRect/MsgTxtContent");
     input = XUIUtils.GetCompmentT <InputField>(transform, "ChatPanel/MsgInputField");
     XUIUtils.ListenerBtn(btn_Expression, BtnExpressionOnClick);
     XUIUtils.ListenerBtn(btn_QuickMsg, BtnQuickMsgOnClick);
     XUIUtils.ListenerBtn(btn_SendMsg, BtnSendMsgOnClick);
     zjhPanel = transform.GetComponent <UIZJHPanel>();
     mask     = XUIUtils.GetCompmentT <Button>(transform, "ChatPanel/mask");
     XUIUtils.ListenerBtn(mask, BtnMaskOnClick);
 }
예제 #25
0
    public override void OnAwake()
    {
        if (!isAwake)
        {
            MessageManager.GetInstance.InsertUIDict(this.GetType(), this);
            TotalInviteTxt   = XUIUtils.GetCompmentT <Text>(transform, "TotalInviteTxt");
            TotalEarningsTxt = XUIUtils.GetCompmentT <Text>(transform, "TotalEarningsTxt");
            CanReceiveTxt    = XUIUtils.GetCompmentT <Text>(transform, "CanReceiveTxt");

            btn_Invite      = XUIUtils.GetCompmentT <Button>(transform, "btn_Invite");
            btn_GetEarnings = XUIUtils.GetCompmentT <Button>(transform, "btn_GetEarnings");
            inviter         = XUIUtils.GetCompmentT <Text>(transform, "inviter");
            XUIUtils.ListenerBtn(btn_Invite, BtnInviteOnClick);
            XUIUtils.ListenerBtn(btn_GetEarnings, BtnGetEarningsOnClick);
            isAwake = true;
        }
        UpdateUI();
    }
예제 #26
0
 public override void OnStart()
 {
     //返回按钮赋值并添加点击事件
     btn_Close = XUIUtils.GetCompmentT <Button>(transform, "BackBtn");
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
     //问号按钮赋值并添加点击事件
     wenHaoBtn = XUIUtils.GetCompmentT <Button>(transform, "DetailsBtn");
     XUIUtils.ListenerBtn(wenHaoBtn, WenhaoOnclick);
     //提示返回按钮赋值并添加点击事件
     tiShiBackBtn = XUIUtils.GetCompmentT <Button>(transform, "TishiPanel/Tishiima/tiShiBackBtn");
     XUIUtils.ListenerBtn(tiShiBackBtn, TishiBtnOnclick);
     //给提示面板赋值
     tiShiPanel = XUIUtils.GetCompmentT <Transform>(transform, "TishiPanel");
     //给货币数量赋值
     dianQuanCount = transform.GetChild(4).GetChild(2).GetChild(1).GetComponent <Text>();
     taoBiCount    = transform.GetChild(4).GetChild(0).GetChild(1).GetComponent <Text>();
     zuanShiCount  = transform.GetChild(4).GetChild(1).GetChild(1).GetComponent <Text>();
     HuobiCount();
 }
예제 #27
0
 public override void OnAwake()
 {
     input           = XUIUtils.GetCompmentT <InputField>(transform, "contentInputField");
     btn_SendMsg     = XUIUtils.GetCompmentT <Button>(transform, "btn_SendMsg");
     btn_Close       = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
     friendNameTxt   = XUIUtils.GetCompmentT <Text>(transform, "friendName");
     msgContentTrans = XUIUtils.GetCompmentT <Transform>(transform, "ChatMsgContent/viewer/Content");
     XUIUtils.ListenerBtn(btn_SendMsg, BtnSendMsgOnClick);
     XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
     if (PlayerCache.friendBaseInfoList != null && PlayerCache.CurrentPrivateUid != -1)
     {
         for (int i = 0; i < PlayerCache.friendBaseInfoList.Count; i++)
         {
             if (PlayerCache.friendBaseInfoList[i].uid == PlayerCache.CurrentPrivateUid)
             {
                 friendNameTxt.text = PlayerCache.friendBaseInfoList[i].userName;
             }
         }
     }
 }
예제 #28
0
    public override void OnStart()
    {
        btn_Close     = XUIUtils.GetCompmentT <Button>(transform, "btn_back");
        btn_Shop      = XUIUtils.GetCompmentT <Button>(transform, "btn_Shop");
        btn_Middle    = XUIUtils.GetCompmentT <Button>(transform, "classicsPanel/Items/ItemList/btn_Middle");
        btn_Advanced  = XUIUtils.GetCompmentT <Button>(transform, "classicsPanel/Items/ItemList/btn_Advanced");
        btn_QuickGame = XUIUtils.GetCompmentT <Button>(transform, "classicsPanel/btn_QuikStart");
        btn_Primary   = XUIUtils.GetCompmentT <Button>(transform, "classicsPanel/Items/ItemList/btn_Primary");
        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_Shop, BtnOpenShopOnClick);
        XUIUtils.ListenerBtn(btn_QuickGame, BtnQuickGameOnClick);

        XUIUtils.ListenerBtn(btn_Middle, BtnMiddleOnClick);
        XUIUtils.ListenerBtn(btn_Advanced, BtnAdvancedOnClick);
        XUIUtils.ListenerBtn(btn_Primary, BtnPrimaryOnClick);

        game1HttpRoomOperation = new Game1HttpRoomOperation();

        canvasGroup.blocksRaycasts = true;
    }
예제 #29
0
    public override void OnAwake()
    {
        base.OnAwake();
        MessageManager.GetInstance.InsertUIDict(this.GetType(), this);


        btn_Close = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");

        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        //获取当前Gameobject 所有子物体
        listPanelTrans     = transform.Find("GrowthBg/ListPanelBg/Listpanel");
        btn_StartTask      = listPanelTrans.GetComponentsInChildren <Button>();
        dbGiftBagOperation = new DbGiftBagOperation();
        GiftBagInfoDto giftBagInfoDto = dbGiftBagOperation.open(PlayerCache.loginInfo.uid);

        if (giftBagInfoDto != null)
        {
            InitGrowthPanel(giftBagInfoDto);
            UpdateUI(giftBagInfoDto);
        }
    }
예제 #30
0
    public override void OnAwake()
    {
        sysTrans    = XUIUtils.GetCompmentT <Transform>(transform, "SystemContent");
        globalTrans = XUIUtils.GetCompmentT <Transform>(transform, "GlobalContent");
        familyTrans = XUIUtils.GetCompmentT <Transform>(transform, "FamilyContent");
        sysTrans.gameObject.AddComponent <SystemMsgPanel>();
        globalTrans.gameObject.AddComponent <GlobalMsgPanel>();
        familyTrans.gameObject.AddComponent <FamilyMsgPanel>();
        currentColor     = Color.white;
        currentMsgType   = MsgType.Text;
        btn_Close        = XUIUtils.GetCompmentT <Button>(transform, "btn_Close");
        btn_SendMsg      = XUIUtils.GetCompmentT <Button>(transform, "btn_SendMsg");
        input            = XUIUtils.GetCompmentT <InputField>(transform, "contentInputField");
        emojiParentTrans = XUIUtils.GetCompmentT <Transform>(transform, "ExpressionBg/grid");
        btn_OpenEmoji    = XUIUtils.GetCompmentT <Button>(transform, "btn_Expression");
        GlobalMsg        = XUIUtils.GetCompmentT <Transform>(transform, "GlobalContent");
        FamilyMsg        = XUIUtils.GetCompmentT <Transform>(transform, "FamilyContent");

        SystemMsg       = XUIUtils.GetCompmentT <Transform>(transform, "SystemContent");
        btn_CloseEmoji  = XUIUtils.GetCompmentT <Button>(transform, "ExpressionBg/btn_CloseEmoji");
        SysScrollbar    = XUIUtils.GetCompmentT <ScrollRect>(transform, "SystemContent");
        GlobalScrollbar = XUIUtils.GetCompmentT <ScrollRect>(transform, "GlobalContent");
        FamilyScrollbar = XUIUtils.GetCompmentT <ScrollRect>(transform, "FamilyContent");
        SysContentTxt   = XUIUtils.GetCompmentT <Text>(SysScrollbar.transform, "viewer/Text");

        btn_Color   = XUIUtils.GetCompmentT <Button>(transform, "btn_Color");
        SelectColor = XUIUtils.GetCompmentT <Transform>(transform, "SelectColor");
        XUIUtils.ListenerBtn(btn_Close, BtnCloseOnClick);
        XUIUtils.ListenerBtn(btn_SendMsg, BtnSendMsgOnClick);
        XUIUtils.ListenerBtn(btn_OpenEmoji, BtnOpenEmojiOnClick);
        XUIUtils.ListenerBtn(btn_CloseEmoji, BtnCloseEmojiOnClick);
        XUIUtils.ListenerBtn(btn_Color, BtnColorClick);

        for (int i = 0; i < SelectColor.GetChild(0).childCount; i++)
        {
            Toggle toggle = SelectColor.GetChild(0).GetChild(i).GetComponent <Toggle>();
            toggle.onValueChanged.AddListener((bool value) => SelectColorOnSelect(toggle, value));
        }
    }