コード例 #1
0
ファイル: PassRewardUI.cs プロジェクト: lbddk/ahzs-client
    void Awake()
    {
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_instanceRewardItemList = FindTransform("InstancePassRewardItemList");
        m_camItemList = FindTransform("InstancePassRewardItemListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_camItemList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            Mogo.Util.LoggerHelper.Debug("InstancePassRewardItemStartPos/InstancePassReward" +( i + 1).ToString() + "ItemStartPos");
            m_vec3StartPos[i] = FindTransform("InstancePassReward" + (i + 1).ToString() + "ItemStartPos").localPosition;
        }

        m_mbOK = FindTransform("InstancePassRewardUIOK").GetComponentsInChildren<MogoButton>(true)[0];
        m_goGOInstancePassRewardUI = FindTransform("GOInstancePassRewardUI").gameObject;
        m_goGOInstancePassRewardUI.SetActive(false);
        m_goInstancePassRewardUILoseText  = FindTransform("InstancePassRewardUILoseText").gameObject;
        m_goInstancePassRewardUIWinText = FindTransform("InstancePassRewardUIWinText").gameObject;
        m_goInstancePassRewardUIWinText.SetActive(false);

        // 胜利动画
        m_goPassRewardUIWinTextSP = FindTransform("PassRewardUIWinTextSP").gameObject;
        m_goPassRewardUIWinTextBG = FindTransform("PassRewardUIWinTextBG").gameObject;
        m_goPassReweardUITopLine = FindTransform("PassRewardUIWinTextBGTopLine").gameObject;
        m_goPassReweardUIBottomLine = FindTransform("PassRewardUIWinTextBGBottomLine").gameObject;
    }
コード例 #2
0
    public MarketBuyView(Transform transform)
    {
        panel      = transform.gameObject;
        name       = transform.Find("name").GetComponent <UILabel>();
        total      = transform.Find("total").GetComponent <UILabel>();
        num        = transform.Find("num").GetComponent <UIInput>();
        minus      = transform.Find("minus").GetComponent <MogoButton>();
        minusminus = transform.Find("minusminus").GetComponent <MogoButton>();
        plus       = transform.Find("plus").GetComponent <MogoButton>();
        plusplus   = transform.Find("plusplus").GetComponent <MogoButton>();
        close      = transform.Find("close").GetComponent <MogoButton>();
        commit     = transform.Find("commit").GetComponent <MogoButton>();
        UILabel c  = transform.Find("close/Label").GetComponent <UILabel>();
        UILabel cm = transform.Find("commit/Label").GetComponent <UILabel>();

        c.text  = Mogo.GameData.LanguageData.GetContent(716); // "取消";
        cm.text = Mogo.GameData.LanguageData.GetContent(717); // "确定";

        minus.clickHandler      = Minus;
        minusminus.clickHandler = MinusMinus;
        plus.clickHandler       = Plus;
        plusplus.clickHandler   = PlusPlus;
        close.clickHandler      = Close;
        commit.clickHandler     = Commit;
        num.validator           = Validator;
        num.onSubmit            = OnInputSubmit;
    }
コード例 #3
0
    void Awake()
    {
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_instanceRewardItemList = FindTransform("InstancePassRewardItemList");
        m_camItemList            = FindTransform("InstancePassRewardItemListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_camItemList.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.Find("Camera").GetComponentsInChildren <Camera>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            Debug.Log("InstancePassRewardItemStartPos/InstancePassReward" + (i + 1).ToString() + "ItemStartPos");
            m_vec3StartPos[i] = FindTransform("InstancePassReward" + (i + 1).ToString() + "ItemStartPos").localPosition;
        }

        m_mbOK = FindTransform("InstancePassRewardUIOK").GetComponentsInChildren <MogoButton>(true)[0];
        m_goGOInstancePassRewardUI = FindTransform("GOInstancePassRewardUI").gameObject;
        m_goGOInstancePassRewardUI.SetActive(false);
        m_goInstancePassRewardUILoseText = FindTransform("InstancePassRewardUILoseText").gameObject;
        m_goInstancePassRewardUIWinText  = FindTransform("InstancePassRewardUIWinText").gameObject;
        m_goInstancePassRewardUIWinText.SetActive(false);

        // ʤ������
        m_goPassRewardUIWinTextSP   = FindTransform("PassRewardUIWinTextSP").gameObject;
        m_goPassRewardUIWinTextBG   = FindTransform("PassRewardUIWinTextBG").gameObject;
        m_goPassReweardUITopLine    = FindTransform("PassRewardUIWinTextBGTopLine").gameObject;
        m_goPassReweardUIBottomLine = FindTransform("PassRewardUIWinTextBGBottomLine").gameObject;
    }
コード例 #4
0
ファイル: MarketBuyView.cs プロジェクト: lbddk/ahzs-client
 public MarketBuyView(Transform transform)
 {
     panel = transform.gameObject;
     name = transform.FindChild("name").GetComponent<UILabel>();
     total = transform.FindChild("total").GetComponent<UILabel>();
     num = transform.FindChild("num").GetComponent<UIInput>();
     minus = transform.FindChild("minus").GetComponent<MogoButton>();
     minusminus = transform.FindChild("minusminus").GetComponent<MogoButton>();
     plus = transform.FindChild("plus").GetComponent<MogoButton>();
     plusplus = transform.FindChild("plusplus").GetComponent<MogoButton>();
     close = transform.FindChild("close").GetComponent<MogoButton>();
     commit = transform.FindChild("commit").GetComponent<MogoButton>();
     UILabel c = transform.FindChild("close/Label").GetComponent<UILabel>();
     UILabel cm = transform.FindChild("commit/Label").GetComponent<UILabel>();
     c.text = Mogo.GameData.LanguageData.GetContent(716); // "取消";
     cm.text = Mogo.GameData.LanguageData.GetContent(717); // "确定";
     
     minus.clickHandler = Minus;
     minusminus.clickHandler = MinusMinus;
     plus.clickHandler = Plus;
     plusplus.clickHandler = PlusPlus;
     close.clickHandler = Close;
     commit.clickHandler = Commit;
     num.validator = Validator;
     num.onSubmit = OnInputSubmit;
 }
コード例 #5
0
    /// <summary>
    /// 设置物品信息
    /// </summary>
    /// <param name="item"></param>
    public void SetItem(MarketItem item)
    {
        InventoryGrid grid = goItem.GetComponent <InventoryGrid>();

        if (grid == null)
        {
            grid = goItem.AddComponent <InventoryGrid>();
        }
        if (item.marketItemType == MarkItemType.MarketItem)
        {
            grid.iconID = item.resData.itemId;
        }
        if (item.marketItemType == MarkItemType.LevelPacks)
        {
            grid.iconID = (item as GiftItem).resData.item;
        }
        if (item.marketItemType == MarkItemType.WingItem)
        {
            grid.iconID = item.resData.itemId;
        }

        // 物品BoxCollider区域添加滑动
        MogoButton mogoButton = goItem.GetComponent <MogoButton>();

        if (mogoButton == null)
        {
            mogoButton = goItem.AddComponent <MogoButton>();
        }
        mogoButton.pressHandler = MarketView.Instance.ListView.PressHandlerOutSide;
        mogoButton.dragHandler  = MarketView.Instance.ListView.DragHandlerOutSide;

        ResetItem();
        data = item;

        m_lblItemName.text = data.name; // 设置Grid的名称

        switch (data.marketItemType)
        {
        case MarkItemType.MarketItem:
        case MarkItemType.WingItem:
            //m_lblItemName.effectStyle = UILabel.Effect.None;
            SetMarketItem();     // 商城出售物品,翅膀
            break;

        case MarkItemType.LevelPacks:
            //m_lblItemName.effectStyle = UILabel.Effect.Outline;
            //m_lblItemName.effectColor = new Color32(50, 39, 9, 255);
            SetLevelPacks();     // 等级礼包
            break;

        default:
            break;
        }
    }
コード例 #6
0
    private void InitReplaceUI()
    {
        m_goReplace         = GetUIChild("EnhantForReplace").gameObject;
        m_lblReplaceNewAttr = GetUIChild("EnhantForReplaceNewAttrText").GetComponent <UILabel>();
        m_lblReplaceTip     = GetUIChild("EnhantForReplaceTip").GetComponent <UILabel>();
        m_lblReplaceOlfAttr = GetUIChild("EnhantForReplaceOldAttrText").GetComponent <UILabel>();
        m_btnReplaceOk      = GetUIChild("EnhantForReplaceOkBtn").GetComponent <MogoButton>();
        m_btnReplaceCancel  = GetUIChild("EnhantForReplaceCancleBtn").GetComponent <MogoButton>();

        m_goReplace.SetActive(false);
    }
コード例 #7
0
ファイル: MarketItemView.cs プロジェクト: lbddk/ahzs-client
    public MarketItemView(Transform transform)
    {
        goItem = transform.gameObject;

        // 物品信息
        m_lblItemName = transform.FindChild("GridItemName").GetComponent<UILabel>();
        m_lblItemNum = transform.FindChild("GridItemNum").GetComponent<UILabel>();
        m_spItemIcon = transform.FindChild("GridItemIcon").GetComponent<UISprite>();        

        m_lblRebateTitle = transform.FindChild("GridRebateTitle").GetComponent<UILabel>();
        m_goRebateFlagBG = transform.FindChild("GridRebateFlag/GridRebateFlagBG").gameObject;
        m_lblRebateFlagText = transform.FindChild("GridRebateFlag/GridRebateFlagText").GetComponent<UILabel>();

        // 新价格
        m_spNewPriceIcon = transform.FindChild("GridNewPrice/GridNewPriceIcon").GetComponent<UISprite>();
        m_lblNewPriceNum = transform.FindChild("GridNewPrice/GridNewPriceNum").GetComponent<UILabel>();
        m_goNewPriceLine = transform.FindChild("GridNewPrice/GridNewPriceLine").gameObject;

        // 旧价格
        m_spOldPriceIcon = transform.FindChild("GridOldPrice/GridOldPriceIcon").GetComponent<UISprite>();
        m_lblOldPriceNum = transform.FindChild("GridOldPrice/GridOldPriceNum").GetComponent<UILabel>();

        // 购买按钮
        buttonBuy = transform.FindChild("GridButtonBuy").GetComponent<MogoButton>();
        buttonBuy.clickHandler = OnButtonBuyUp;

        //预览按钮
        buttonPreview = transform.FindChild("GridPreview").GetComponent<MogoButton>();
        buttonPreview.clickHandler = OnButtonPreviewUp;

        // 领取按钮
        m_goButtonDraw = transform.FindChild("GridButtonDraw").gameObject;
        buttonDraw = m_goButtonDraw.GetComponent<MogoButton>();
        buttonDraw.clickHandler = OnButtonDrawUp;
        m_lblButtonDrawLabel = transform.FindChild("GridButtonDraw/GridButtonDrawLabel").GetComponentsInChildren<UILabel>(true)[0];
        m_spButtonDrawBGUp = transform.FindChild("GridButtonDraw/GridButtonDrawBGUp").GetComponentsInChildren<UISprite>(true)[0];

        // 其他
        limitflag = transform.FindChild("limitflag").gameObject;
        hotflag = transform.FindChild("hotflag").gameObject;
        newflag = transform.FindChild("newflag").gameObject;
        delline = transform.FindChild("delline").gameObject;

        // ChineseData
        transform.FindChild("GridButtonBuy/GridButtonBuyLabel").GetComponent<UILabel>().text = Mogo.GameData.LanguageData.GetContent(1051); // "购买";
        transform.FindChild("GridPreview/GridPreviewText").GetComponent<UILabel>().text = Mogo.GameData.LanguageData.GetContent(26804);//预览
    }
コード例 #8
0
    public MarketItemView(Transform transform)
    {
        goItem = transform.gameObject;

        // 物品信息
        m_lblItemName = transform.FindChild("GridItemName").GetComponent <UILabel>();
        m_lblItemNum  = transform.FindChild("GridItemNum").GetComponent <UILabel>();
        m_spItemIcon  = transform.FindChild("GridItemIcon").GetComponent <UISprite>();

        m_lblRebateTitle    = transform.FindChild("GridRebateTitle").GetComponent <UILabel>();
        m_goRebateFlagBG    = transform.FindChild("GridRebateFlag/GridRebateFlagBG").gameObject;
        m_lblRebateFlagText = transform.FindChild("GridRebateFlag/GridRebateFlagText").GetComponent <UILabel>();

        // 新价格
        m_spNewPriceIcon = transform.FindChild("GridNewPrice/GridNewPriceIcon").GetComponent <UISprite>();
        m_lblNewPriceNum = transform.FindChild("GridNewPrice/GridNewPriceNum").GetComponent <UILabel>();
        m_goNewPriceLine = transform.FindChild("GridNewPrice/GridNewPriceLine").gameObject;

        // 旧价格
        m_spOldPriceIcon = transform.FindChild("GridOldPrice/GridOldPriceIcon").GetComponent <UISprite>();
        m_lblOldPriceNum = transform.FindChild("GridOldPrice/GridOldPriceNum").GetComponent <UILabel>();

        // 购买按钮
        buttonBuy = transform.FindChild("GridButtonBuy").GetComponent <MogoButton>();
        buttonBuy.clickHandler = OnButtonBuyUp;

        //预览按钮
        buttonPreview = transform.FindChild("GridPreview").GetComponent <MogoButton>();
        buttonPreview.clickHandler = OnButtonPreviewUp;

        // 领取按钮
        m_goButtonDraw          = transform.FindChild("GridButtonDraw").gameObject;
        buttonDraw              = m_goButtonDraw.GetComponent <MogoButton>();
        buttonDraw.clickHandler = OnButtonDrawUp;
        m_lblButtonDrawLabel    = transform.FindChild("GridButtonDraw/GridButtonDrawLabel").GetComponentsInChildren <UILabel>(true)[0];
        m_spButtonDrawBGUp      = transform.FindChild("GridButtonDraw/GridButtonDrawBGUp").GetComponentsInChildren <UISprite>(true)[0];

        // 其他
        limitflag = transform.FindChild("limitflag").gameObject;
        hotflag   = transform.FindChild("hotflag").gameObject;
        newflag   = transform.FindChild("newflag").gameObject;
        delline   = transform.FindChild("delline").gameObject;

        // ChineseData
        transform.FindChild("GridButtonBuy/GridButtonBuyLabel").GetComponent <UILabel>().text = Mogo.GameData.LanguageData.GetContent(1051);  // "购买";
        transform.FindChild("GridPreview/GridPreviewText").GetComponent <UILabel>().text      = Mogo.GameData.LanguageData.GetContent(26804); //预览
    }
コード例 #9
0
    void Start()
    {
        c = new GameObject();
        c.transform.parent     = transform;
        c.transform.localScale = new Vector3(1, 1, 1);
        bc           = gameObject.AddComponent <BoxCollider>();
        bc.size      = new Vector3(width, height, 0);
        bc.isTrigger = true;
        bc.enabled   = canDrag;
        MogoButton cameraBtn = gameObject.AddComponent <MogoButton>();

        cameraBtn.pressHandler = PressHandler;
        cameraBtn.dragHandler  = DragHandler;

        m_myCamera = c.AddComponent <Camera>();
        UICamera uiCamera = c.AddComponent <UICamera>();

        c.AddComponent <TweenPosition>();

        m_myCamera.clearFlags       = CameraClearFlags.Nothing;
        m_myCamera.cullingMask      = 1 << gameObject.layer;
        m_myCamera.orthographic     = true;
        m_myCamera.orthographicSize = stageSize;
        m_myCamera.nearClipPlane    = -999;
        m_myCamera.farClipPlane     = 999;
        float dx = width / stageSize;
        float w  = Screen.width;
        float h  = Screen.height;
        float r  = w / h;
        float ro = stageSize / stageHeight;

        if (r > ro)
        {
            float wn = width * (h / stageHeight);
            dx = wn / w;
            m_myCamera.rect = new Rect((1 - dx) / 2, 0, dx, 1);
        }
        else
        {
            m_myCamera.rect = new Rect((1 - dx) / 2, 0, dx, 1);
        }
        m_myCamera.depth = cameraDepth;

        uiCamera.eventReceiverMask = 1 << gameObject.layer;

        Mogo.Util.TimerHeap.AddTimer <Vector3>(500, 0, ResetPos, transform.localPosition);
    }
コード例 #10
0
    /// <summary>
    /// 设置选项卡
    /// </summary>
    void RankingTabListResourceLoaded()
    {
        if (RankingUILogicManager.Instance == null)
        {
            return;
        }

        var m_dataList = m_tabMogoListImproved.DataList;

        m_tabMogoSingleButtonList.SingleButtonList.Clear();
        for (int i = 0; i < m_dataList.Count; i++)
        {
            RankingUITabGrid rankingUITabGrid = (RankingUITabGrid)m_dataList[i];
            RankData         xmlRankData      = RankData.GetRankDataByID(m_sortTabIDList[i]);
            rankingUITabGrid.TabID = i;

            if (xmlRankData != null)
            {
                rankingUITabGrid.RankingUITabText = LanguageData.GetContent(xmlRankData.name);
                if (xmlRankData.ifReward == 1)
                {
                    rankingUITabGrid.IfReward = true;
                }
                else
                {
                    rankingUITabGrid.IfReward = false;
                }
            }

            // SingleButtonList
            m_tabMogoSingleButtonList.SingleButtonList.Add(rankingUITabGrid.GetComponentsInChildren <MogoSingleButton>(true)[0]);

            // BoxCollider区域添加滑动
            MogoButton mogoButton = rankingUITabGrid.GetComponent <MogoButton>();
            if (mogoButton == null)
            {
                mogoButton = rankingUITabGrid.gameObject.AddComponent <MogoButton>();
            }
            mogoButton.pressHandler = m_tabMogoListImproved.PressHandlerOutSide;
            mogoButton.dragHandler  = m_tabMogoListImproved.DragHandlerOutSide;

            m_tabMogoSingleButtonList.SetCurrentDownButton(0); // 默认选择第一项
        }
    }
コード例 #11
0
    private void InitProcessUI()
    {
        m_goProcess = GetUIChild("EnhantProcess").gameObject;

        m_tipList = new List<GameObject>();
        m_tipLblList = new List<UILabel>();
        m_tipTweenList = new List<TweenAlpha>();
        for (int i = 1; i <= 5; i++)
        {
            m_tipList.Add(GetUIChild("EnhantProcessTip" + i).gameObject);
            m_tipLblList.Add(GetUIChild("EnhantProcessTip" + i).GetComponent<UILabel>());
            m_tipTweenList.Add(GetUIChild("EnhantProcessTip" + i).GetComponent<TweenAlpha>());
        }
        m_btnProcessCancel = GetUIChild("EnhantProcessCancleBtn").GetComponent<MogoButton>();
        m_btnProcessName = GetUIChild("EnhantProcessText").GetComponent<UILabel>();
        m_lblProcessTitle = GetUIChild("EnhantProcessTip").GetComponent<UILabel>();

        m_goProcess.SetActive(false);
    }
コード例 #12
0
    private void InitProcessUI()
    {
        m_goProcess = GetUIChild("EnhantProcess").gameObject;

        m_tipList      = new List <GameObject>();
        m_tipLblList   = new List <UILabel>();
        m_tipTweenList = new List <TweenAlpha>();
        for (int i = 1; i <= 5; i++)
        {
            m_tipList.Add(GetUIChild("EnhantProcessTip" + i).gameObject);
            m_tipLblList.Add(GetUIChild("EnhantProcessTip" + i).GetComponent <UILabel>());
            m_tipTweenList.Add(GetUIChild("EnhantProcessTip" + i).GetComponent <TweenAlpha>());
        }
        m_btnProcessCancel = GetUIChild("EnhantProcessCancleBtn").GetComponent <MogoButton>();
        m_btnProcessName   = GetUIChild("EnhantProcessText").GetComponent <UILabel>();
        m_lblProcessTitle  = GetUIChild("EnhantProcessTip").GetComponent <UILabel>();

        m_goProcess.SetActive(false);
    }
コード例 #13
0
    private void InitFullUI()
    {
        m_lblFullCancelBtnName = GetUIChild("EnhantForFullCancleText").GetComponent <UILabel>();
        m_lblFullTip2          = GetUIChild("EnhantForFullTip2").GetComponent <UILabel>();
        m_lblFullTip           = GetUIChild("EnhantForFullTip").GetComponent <UILabel>();
        m_goFull             = GetUIChild("EnhantForFull").gameObject;
        m_lblFullNewAttr     = GetUIChild("EnhantForFullNewAttrText").GetComponent <UILabel>();
        m_lblFullOlfAttrList = new List <UILabel>();
        m_btnReplaceOkList   = new List <MogoButton>();
        m_gridList           = new List <GameObject>();
        for (int i = 1; i <= 4; i++)
        {
            m_gridList.Add(GetUIChild("EnhantForFullGrid" + i).gameObject);
            m_lblFullOlfAttrList.Add(GetUIChild("EnhantForFullGrid" + i + "Txt").GetComponent <UILabel>());
            m_btnReplaceOkList.Add(GetUIChild("EnhantForFullGrid" + i + "OkBtn").GetComponent <MogoButton>());
        }
        m_btnFullCancel = GetUIChild("EnhantForFullCancleBtn").GetComponent <MogoButton>();

        m_goFull.SetActive(false);
    }
コード例 #14
0
    public override void OnInspectorGUI()
    {
        EditorGUIUtility.LookLikeControls(80f);
        mMogoButton = target as MogoButton;

        EditorGUILayout.Space();

        GUILayout.BeginHorizontal();
        bool isDragCancel = EditorGUILayout.Toggle("IsDragCancel", mMogoButton.IsDragCancel, GUILayout.Width(100f));

        if (isDragCancel != mMogoButton.IsDragCancel)
        {
            RegisterUndo(); mMogoButton.IsDragCancel = isDragCancel;
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("一秒变样式", GUILayout.Width(75f));
        //if (GUILayout.Button("底纹", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUINormalButton(mMogoButton.gameObject);
        //if (GUILayout.Button("确定", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUIOKButton(mMogoButton.gameObject);
        //if (GUILayout.Button("确定(小)", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUIOKSmallButton(mMogoButton.gameObject);
        //GUILayout.EndHorizontal();

        //GUILayout.BeginHorizontal();
        //GUILayout.Label("", GUILayout.Width(75f));
        //if (GUILayout.Button("取消", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUICancelButton(mMogoButton.gameObject);
        //if (GUILayout.Button("关闭", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUICloseButton(mMogoButton.gameObject);
        //if (GUILayout.Button("充值", GUILayout.Width(50f)))
        //    ExportScenesManager.SetUIChargeButton(mMogoButton.gameObject);
        GUILayout.EndHorizontal();
    }
コード例 #15
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_closeBtn        = m_myTransform.FindChild(m_widgetToFullName["SanctuaryUIClose"]).GetComponentsInChildren <MogoButton>(true)[0];
        m_myAchieveBtn    = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIcon"]).GetComponentsInChildren <MogoButton>(true)[0];
        m_weekRankBtn     = m_myTransform.FindChild(m_widgetToFullName["WeekRankIcon"]).GetComponentsInChildren <MogoButton>(true)[0];
        m_todayRankBtn    = m_myTransform.FindChild(m_widgetToFullName["TodayRankIcon"]).GetComponentsInChildren <MogoButton>(true)[0];
        m_achieveReardBtn = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItem"]).GetComponentsInChildren <MogoButton>(true)[0];

        m_goSanctuaryUIDialogList[0] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementDialog"]).gameObject;
        m_goSanctuaryUIDialogList[1] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialog"]).gameObject;
        m_goSanctuaryUIDialogList[2] = m_myTransform.FindChild(m_widgetToFullName["TodayRankDialog"]).gameObject;

        m_camRankGrid   = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_camRewardGrid = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardListCamera"]).GetComponentsInChildren <Camera>(true)[0];

        m_camRankGrid.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera   = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren <Camera>(true)[0];
        m_camRewardGrid.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_lblCurrentAchieve = m_myTransform.FindChild(m_widgetToFullName["CurrentAchievementNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblNextAchieve    = m_myTransform.FindChild(m_widgetToFullName["NextAchievementNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblNextAchievementRewardGoldNum = m_myTransform.FindChild(m_widgetToFullName["NextAchievementRewardGoldNum"]).GetComponentsInChildren <UILabel>(true)[0];

        m_spAchieveReward = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItemFG"]).GetComponentsInChildren <UISprite>(true)[0];

        m_transRankGridList   = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridList"]);
        m_transRewardGridList = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardList"]);

        m_goRewardTip = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardTip"]).gameObject;
        m_goRewardTip.AddComponent <RewardGridTip>().TipNum = 4;

        m_lblPlayerRank       = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomRank"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblPlayerName       = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomName"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblPlayerContribute = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomAchieve"]).GetComponentsInChildren <UILabel>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            m_arrRankPlayerGrid[i] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGrid" + i]).gameObject;
        }

        m_tranMyAchievementDialogRewardList = FindTransform("MyAchievementDialogRewardList");

        m_sanctuaryTabLabelList[(int)SanctuaryUITab.MyAchievementTab] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIconText"]).GetComponent <UILabel>();
        m_sanctuaryTabLabelList[(int)SanctuaryUITab.WeekRankTab]      = m_myTransform.FindChild(m_widgetToFullName["WeekRankIconText"]).GetComponent <UILabel>();
        m_sanctuaryTabLabelList[(int)SanctuaryUITab.TodayRankTab]     = m_myTransform.FindChild(m_widgetToFullName["TodayRankIconText"]).GetComponent <UILabel>();
        foreach (var pair in m_sanctuaryTabLabelList)
        {
            if (pair.Key == (int)SanctuaryUITab.MyAchievementTab)
            {
                SanctuaryTabDown(pair.Key);
            }
            else
            {
                SanctuaryTabUp(pair.Key);
            }
        }

        // ChineseData
        FindTransform("SanctuaryUIName").GetComponentsInChildren <UILabel>(true)[0].text = LanguageData.GetContent(24030);

        Initialize();
    }
コード例 #16
0
    void Awake()
    {
        m_instance = this;

        m_spMarketUIMogoUIRefreshCtrl = transform.FindChild("MarketUIMogoUIRefreshCtrl").GetComponentsInChildren <UISprite>(true)[0];

        keyView        = transform.FindChild("keyView").gameObject;
        keyActivateBtn = keyView.transform.FindChild("Button").GetComponent <MogoButton>();
        keyInput       = keyView.transform.FindChild("Input").GetComponent <UIInput>();

        // 热销
        hotImgBtn        = transform.FindChild("hot").GetComponent <UIImageButton>();
        hot              = transform.FindChild("hot").GetComponent <MogoButton>();
        hot.clickHandler = HotList;
        hot.pressHandler = HotPress;
        // 等级礼包
        itemImgBtn         = transform.FindChild("item").GetComponent <UIImageButton>();
        item               = transform.FindChild("item").GetComponent <MogoButton>();
        item.clickHandler  = ItemList;
        item.pressHandler  = ItemPress;
        m_goItemIconNotice = transform.FindChild("item/ItemIconNotice").gameObject;
        // 宝石
        jewelImgBtn        = transform.FindChild("jewel").GetComponent <UIImageButton>();
        jewel              = transform.FindChild("jewel").GetComponent <MogoButton>();
        jewel.clickHandler = JewelList;
        jewel.pressHandler = JewelPress;
        // 激活码礼包
        keyImgBtn                   = transform.FindChild("key").GetComponent <UIImageButton>();
        key                         = transform.FindChild("key").GetComponent <MogoButton>();
        key.clickHandler            = KeyView;
        key.pressHandler            = KeyPress;
        keyActivateBtn.clickHandler = Activate;
        //翅膀
        wingImgBtn        = transform.FindChild("Wing").GetComponent <UIImageButton>();
        wing              = transform.FindChild("Wing").GetComponent <MogoButton>();
        wing.clickHandler = WingView;
        wing.pressHandler = WingPress;

        m_marketUIBtnClose = transform.FindChild("MarketUIBtnClose").GetComponentsInChildren <MogoButton>(true)[0];
        m_marketUIBtnClose.clickHandler = CloseHandler;

        m_goMarketUIArrowL = transform.FindChild("MarketUIArrow/MarketUIArrowL").gameObject;
        m_goMarketUIArrowR = transform.FindChild("MarketUIArrow/MarketUIArrowR").gameObject;

        pay  = transform.FindChild("MarketUIBtnPay").GetComponent <MogoButton>();
        rmb  = transform.FindChild("MarketUIDiamondNum").GetComponent <UILabel>();
        page = transform.FindChild("MarketUIPageNum").GetComponent <UILabel>();

        m_MarketTabLabelList[(int)MarketUITab.HotTab]   = transform.FindChild("hot/HotLabel").GetComponent <UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.JewelTab] = transform.FindChild("jewel/JewelLabel").GetComponent <UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.ItemTab]  = transform.FindChild("item/ItemLabel").GetComponent <UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.KeyTab]   = transform.FindChild("key/KeyLabel").GetComponent <UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.WingTab]  = transform.FindChild("Wing/WingLabel").GetComponent <UILabel>();
        foreach (var pair in m_MarketTabLabelList)
        {
            if (pair.Key == (int)MarketUITab.HotTab)
            {
                MarketTabDown(pair.Key);
            }
            else
            {
                MarketTabUp(pair.Key);
            }
        }

        // ChineseData
        if (m_MarketTabLabelList[(int)MarketUITab.HotTab] != null)
        {
            m_MarketTabLabelList[(int)MarketUITab.HotTab].text = LanguageData.GetContent(200011); // "热销";
        }
        if (m_MarketTabLabelList[(int)MarketUITab.JewelTab] != null)
        {
            m_MarketTabLabelList[(int)MarketUITab.JewelTab].text = LanguageData.GetContent(200012); // "宝石";
        }
        if (m_MarketTabLabelList[(int)MarketUITab.ItemTab] != null)
        {
            m_MarketTabLabelList[(int)MarketUITab.ItemTab].text = LanguageData.GetContent(200013); // "道具";
        }
        if (m_MarketTabLabelList[(int)MarketUITab.KeyTab] != null)
        {
            m_MarketTabLabelList[(int)MarketUITab.KeyTab].text = LanguageData.GetContent(200014); // "激活码";
        }
        if (m_MarketTabLabelList[(int)MarketUITab.WingTab] != null)
        {
            m_MarketTabLabelList[(int)MarketUITab.WingTab].text = LanguageData.GetContent(7525);                                           //翅膀
        }
        gameObject.transform.FindChild("MarketUIBtnPay/MarketUIBtnPayText").GetComponent <UILabel>().text = LanguageData.GetContent(5001); // "充值";

        Transform cell      = transform.FindChild("list/PropCell");
        Transform listStage = transform.FindChild("list");

        listView          = listStage.GetComponent <MogoList>();
        listView.turnPage = TurnPage;

        list.Add(new MarketItemView(cell));

        for (int ii = 1; ii <= pageSize - 1; ii++)
        {
            GameObject     copyCell = GameObject.Instantiate(cell.gameObject) as GameObject;
            MarketItemView itemCell = new MarketItemView(copyCell.transform);
            itemCell.AddToParent(listStage, gameObject.transform.rotation);
            list.Add(itemCell);
            itemCell.LocalPosition = cell.localPosition + new Vector3(CELL_WIDTH * ii, 0, 0);
        }

        //pre.clickHandler = PrePage;
        //next.clickHandler = NextPage;
        pay.clickHandler = Pay;

        buy = new MarketBuyView(gameObject.transform.FindChild("Buy"));
        buy.Close();
        hotImgBtn.SelectedStatus(true);
        keyView.SetActive(false);
        EventDispatcher.AddEventListener <MarketItem>(MarketEvent.OpenBuy, OpenBuy);
        EventDispatcher.AddEventListener <bool>(MarketEvent.LigthArrow, LightArrowHandler);
    }
コード例 #17
0
    private void InitReplaceUI()
    {
        m_goReplace = GetUIChild("EnhantForReplace").gameObject;
        m_lblReplaceNewAttr = GetUIChild("EnhantForReplaceNewAttrText").GetComponent<UILabel>();
        m_lblReplaceTip = GetUIChild("EnhantForReplaceTip").GetComponent<UILabel>();
        m_lblReplaceOlfAttr = GetUIChild("EnhantForReplaceOldAttrText").GetComponent<UILabel>();
        m_btnReplaceOk = GetUIChild("EnhantForReplaceOkBtn").GetComponent<MogoButton>();
        m_btnReplaceCancel = GetUIChild("EnhantForReplaceCancleBtn").GetComponent<MogoButton>();

        m_goReplace.SetActive(false);
    }
コード例 #18
0
    private void InitFullUI()
    {
        m_lblFullCancelBtnName = GetUIChild("EnhantForFullCancleText").GetComponent<UILabel>();
        m_lblFullTip2 = GetUIChild("EnhantForFullTip2").GetComponent<UILabel>();
        m_lblFullTip = GetUIChild("EnhantForFullTip").GetComponent<UILabel>();
        m_goFull = GetUIChild("EnhantForFull").gameObject;
        m_lblFullNewAttr = GetUIChild("EnhantForFullNewAttrText").GetComponent<UILabel>();
        m_lblFullOlfAttrList = new List<UILabel>();
        m_btnReplaceOkList = new List<MogoButton>();
        m_gridList = new List<GameObject>();
        for (int i = 1; i <= 4; i++)
        {
            m_gridList.Add(GetUIChild("EnhantForFullGrid" + i).gameObject);
            m_lblFullOlfAttrList.Add(GetUIChild("EnhantForFullGrid" + i + "Txt").GetComponent<UILabel>());
            m_btnReplaceOkList.Add(GetUIChild("EnhantForFullGrid" + i + "OkBtn").GetComponent<MogoButton>());
        }
        m_btnFullCancel = GetUIChild("EnhantForFullCancleBtn").GetComponent<MogoButton>();

        m_goFull.SetActive(false);
    }
コード例 #19
0
ファイル: MarketView.cs プロジェクト: lbddk/ahzs-client
    void Awake()
    {
        m_instance = this;

        m_spMarketUIMogoUIRefreshCtrl = transform.FindChild("MarketUIMogoUIRefreshCtrl").GetComponentsInChildren<UISprite>(true)[0];

        keyView = transform.FindChild("keyView").gameObject;
        keyActivateBtn = keyView.transform.FindChild("Button").GetComponent<MogoButton>();
        keyInput = keyView.transform.FindChild("Input").GetComponent<UIInput>();

        // 热销
        hotImgBtn = transform.FindChild("hot").GetComponent<UIImageButton>();
        hot = transform.FindChild("hot").GetComponent<MogoButton>();
        hot.clickHandler = HotList;
        hot.pressHandler = HotPress;
        // 等级礼包
        itemImgBtn = transform.FindChild("item").GetComponent<UIImageButton>();
        item = transform.FindChild("item").GetComponent<MogoButton>();
        item.clickHandler = ItemList;
        item.pressHandler = ItemPress;
        m_goItemIconNotice = transform.FindChild("item/ItemIconNotice").gameObject;
        // 宝石
        jewelImgBtn = transform.FindChild("jewel").GetComponent<UIImageButton>();
        jewel = transform.FindChild("jewel").GetComponent<MogoButton>();
        jewel.clickHandler = JewelList;
        jewel.pressHandler = JewelPress;
        // 激活码礼包
        keyImgBtn = transform.FindChild("key").GetComponent<UIImageButton>();
        key = transform.FindChild("key").GetComponent<MogoButton>();
        key.clickHandler = KeyView;
        key.pressHandler = KeyPress;
        keyActivateBtn.clickHandler = Activate;
        //翅膀
        wingImgBtn = transform.FindChild("Wing").GetComponent<UIImageButton>();
        wing = transform.FindChild("Wing").GetComponent<MogoButton>();
        wing.clickHandler = WingView;
        wing.pressHandler = WingPress;

        m_marketUIBtnClose = transform.FindChild("MarketUIBtnClose").GetComponentsInChildren<MogoButton>(true)[0];
        m_marketUIBtnClose.clickHandler = CloseHandler;

        m_goMarketUIArrowL = transform.FindChild("MarketUIArrow/MarketUIArrowL").gameObject;
        m_goMarketUIArrowR = transform.FindChild("MarketUIArrow/MarketUIArrowR").gameObject;

        pay = transform.FindChild("MarketUIBtnPay").GetComponent<MogoButton>();
        rmb = transform.FindChild("MarketUIDiamondNum").GetComponent<UILabel>();
        page = transform.FindChild("MarketUIPageNum").GetComponent<UILabel>();

        m_MarketTabLabelList[(int)MarketUITab.HotTab] = transform.FindChild("hot/HotLabel").GetComponent<UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.JewelTab] = transform.FindChild("jewel/JewelLabel").GetComponent<UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.ItemTab] = transform.FindChild("item/ItemLabel").GetComponent<UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.KeyTab] = transform.FindChild("key/KeyLabel").GetComponent<UILabel>();
        m_MarketTabLabelList[(int)MarketUITab.WingTab] = transform.FindChild("Wing/WingLabel").GetComponent<UILabel>();
        foreach (var pair in m_MarketTabLabelList)
        {
            if (pair.Key == (int)MarketUITab.HotTab)
                MarketTabDown(pair.Key);
            else
                MarketTabUp(pair.Key);
        }

        // ChineseData
        if (m_MarketTabLabelList[(int)MarketUITab.HotTab] != null)
            m_MarketTabLabelList[(int)MarketUITab.HotTab].text = LanguageData.GetContent(200011); // "热销";
        if (m_MarketTabLabelList[(int)MarketUITab.JewelTab] != null)
            m_MarketTabLabelList[(int)MarketUITab.JewelTab].text = LanguageData.GetContent(200012); // "宝石";
        if (m_MarketTabLabelList[(int)MarketUITab.ItemTab] != null)
            m_MarketTabLabelList[(int)MarketUITab.ItemTab].text = LanguageData.GetContent(200013); // "道具";
        if (m_MarketTabLabelList[(int)MarketUITab.KeyTab] != null)
            m_MarketTabLabelList[(int)MarketUITab.KeyTab].text = LanguageData.GetContent(200014); // "激活码";
        if (m_MarketTabLabelList[(int)MarketUITab.WingTab] != null)
            m_MarketTabLabelList[(int)MarketUITab.WingTab].text = LanguageData.GetContent(7525); //翅膀
        gameObject.transform.FindChild("MarketUIBtnPay/MarketUIBtnPayText").GetComponent<UILabel>().text = LanguageData.GetContent(5001); // "充值";

        Transform cell = transform.FindChild("list/PropCell");
        Transform listStage = transform.FindChild("list");
        listView = listStage.GetComponent<MogoList>();
        listView.turnPage = TurnPage;

        list.Add(new MarketItemView(cell));

        for (int ii = 1; ii <= pageSize - 1; ii++)
        {
            GameObject copyCell = GameObject.Instantiate(cell.gameObject) as GameObject;
            MarketItemView itemCell = new MarketItemView(copyCell.transform);
            itemCell.AddToParent(listStage, gameObject.transform.rotation);
            list.Add(itemCell);
            itemCell.LocalPosition = cell.localPosition + new Vector3(CELL_WIDTH * ii, 0, 0);
        }

        //pre.clickHandler = PrePage;
        //next.clickHandler = NextPage;
        pay.clickHandler = Pay;

        buy = new MarketBuyView(gameObject.transform.FindChild("Buy"));
        buy.Close();
        hotImgBtn.SelectedStatus(true);
        keyView.SetActive(false);
        EventDispatcher.AddEventListener<MarketItem>(MarketEvent.OpenBuy, OpenBuy);
        EventDispatcher.AddEventListener<bool>(MarketEvent.LigthArrow, LightArrowHandler);
    }
コード例 #20
0
    /// <summary>
    /// 设置排名数据
    /// </summary>
    void RankingMainDataListResourceLoaded()
    {
        var m_dataList = m_mainRankDataMogoListImproved.DataList;

        m_mainRankDataMogoSingleButtonList.SingleButtonList.Clear();
        for (int i = 0; i < m_dataList.Count; i++)
        {
            RankingUIRankData rankingUIRankData = (RankingUIRankData)m_dataList[i];
            rankingUIRankData.Index = i;
            rankingUIRankData.RankingUIMainRankData1          = m_rankingMainDataList[i].uniqieRank.ToString();
            rankingUIRankData.RankingUIMainRankData2Name      = m_rankingMainDataList[i].recordName;
            rankingUIRankData.RankingUIMainRankData3          = m_rankingMainDataList[i].level;
            rankingUIRankData.RankingUIMainRankData4          = m_rankingMainDataList[i].attrib.ToString("N0");
            rankingUIRankData.RankingUIMainRankData5FansCount = m_rankingMainDataList[i].fansCount;
            rankingUIRankData.AvatarID = m_rankingMainDataList[i].tdbID;

            // SingleButtonList
            m_mainRankDataMogoSingleButtonList.SingleButtonList.Add(rankingUIRankData.GetComponentsInChildren <MogoSingleButton>(true)[0]);

            // BoxCollider区域添加滑动
            MogoButton mogoButton = rankingUIRankData.GetComponent <MogoButton>();
            if (mogoButton == null)
            {
                mogoButton = rankingUIRankData.gameObject.AddComponent <MogoButton>();
            }
            mogoButton.pressHandler = m_mainRankDataMogoListImproved.PressHandlerOutSide;
            mogoButton.dragHandler  = m_mainRankDataMogoListImproved.DragHandlerOutSide;
        }

        m_mainRankDataMogoListImproved.StopTween();
        m_mainRankDataMogoListImproved.ResetCameraPos();

        if (m_mainRankDataMogoListImproved.gameObject.activeSelf)
        {
            if (CurrentPage >= 0 && CurrentPage <= m_mainRankDataMogoListImproved.MaxPageIndex)
            {
                //Debug.LogError("1.CurrentPage is " + CurrentPage);
                m_mainRankDataMogoListImproved.TweenTo(CurrentPage, true); // 数据返回时滑动到标记页
            }
            else if (m_playerRankDataMogoListImproved.CurrentPage <= m_playerRankDataMogoListImproved.MaxPageIndex)
            {
                //Debug.LogError("2.CurrentPage is " + m_playerRankDataMogoListImproved.CurrentPage);
                m_mainRankDataMogoListImproved.TweenTo(m_playerRankDataMogoListImproved.CurrentPage, true);
                CurrentPage = m_playerRankDataMogoListImproved.CurrentPage;
            }
            else
            {
                //Debug.LogError("3.CurrentPage is " + 0);
                m_mainRankDataMogoListImproved.TweenTo(0, true);
                CurrentPage = 0;
            }
        }
        else
        {
            m_mainRankDataMogoListImproved.TweenTo(m_playerRankDataMogoListImproved.CurrentPage, true);
            CurrentPage = m_playerRankDataMogoListImproved.CurrentPage;
        }

        MogoGlobleUIManager.Instance.ShowWaitingTip(false);
        RankingUIViewManager.Instance.ShowRankingUIWaitingTip(false);
    }
コード例 #21
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_closeBtn = m_myTransform.FindChild(m_widgetToFullName["SanctuaryUIClose"]).GetComponentsInChildren<MogoButton>(true)[0];
        m_myAchieveBtn = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
        m_weekRankBtn = m_myTransform.FindChild(m_widgetToFullName["WeekRankIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
        m_todayRankBtn = m_myTransform.FindChild(m_widgetToFullName["TodayRankIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
        m_achieveReardBtn = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItem"]).GetComponentsInChildren<MogoButton>(true)[0];

        m_goSanctuaryUIDialogList[0] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementDialog"]).gameObject;
        m_goSanctuaryUIDialogList[1] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialog"]).gameObject;
        m_goSanctuaryUIDialogList[2] = m_myTransform.FindChild(m_widgetToFullName["TodayRankDialog"]).gameObject;

        m_camRankGrid = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_camRewardGrid = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardListCamera"]).GetComponentsInChildren<Camera>(true)[0];

        m_camRankGrid.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_camRewardGrid.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        m_lblCurrentAchieve = m_myTransform.FindChild(m_widgetToFullName["CurrentAchievementNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblNextAchieve = m_myTransform.FindChild(m_widgetToFullName["NextAchievementNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblNextAchievementRewardGoldNum = m_myTransform.FindChild(m_widgetToFullName["NextAchievementRewardGoldNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_spAchieveReward = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItemFG"]).GetComponentsInChildren<UISprite>(true)[0];

        m_transRankGridList = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridList"]);
        m_transRewardGridList = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardList"]);

        m_goRewardTip = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardTip"]).gameObject;
        m_goRewardTip.AddComponent<RewardGridTip>().TipNum = 4;

        m_lblPlayerRank = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomRank"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblPlayerName = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomName"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblPlayerContribute = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomAchieve"]).GetComponentsInChildren<UILabel>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            m_arrRankPlayerGrid[i] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGrid" + i]).gameObject;
        }

        m_tranMyAchievementDialogRewardList = FindTransform("MyAchievementDialogRewardList");

        m_sanctuaryTabLabelList[(int)SanctuaryUITab.MyAchievementTab] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIconText"]).GetComponent<UILabel>();
        m_sanctuaryTabLabelList[(int)SanctuaryUITab.WeekRankTab] = m_myTransform.FindChild(m_widgetToFullName["WeekRankIconText"]).GetComponent<UILabel>();
        m_sanctuaryTabLabelList[(int)SanctuaryUITab.TodayRankTab] = m_myTransform.FindChild(m_widgetToFullName["TodayRankIconText"]).GetComponent<UILabel>();
        foreach (var pair in m_sanctuaryTabLabelList)
        {
            if (pair.Key == (int)SanctuaryUITab.MyAchievementTab)
                SanctuaryTabDown(pair.Key);
            else
                SanctuaryTabUp(pair.Key);
        }

        // ChineseData
        FindTransform("SanctuaryUIName").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(24030);

        Initialize();
    }
コード例 #22
0
ファイル: LoginRewardGrid.cs プロジェクト: mengtest/xxxxx
    void Awake()
    {
        m_myTransform = transform;

        m_lblNewServerRightText = m_myTransform.Find(
            "LoginRewardGridRight/LoginRewardGridRightNewServer/LoginRewardGridRightNewServerTitle").GetComponentsInChildren <UILabel>(true)[0];

        m_lblOldServerRightText = m_myTransform.Find(
            "LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerTitle").GetComponentsInChildren <UILabel>(true)[0];

        m_goLoginRewardGridLeftBG = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftBGGO").gameObject;
        m_spLeftGetSign           = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftGetSign").GetComponentsInChildren <UISprite>(true)[0];
        m_spRightGetSign          = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightNewServer/LoginRewardGridRightGetSign").GetComponentsInChildren <UISprite>(true)[0];
        m_lblOldServerItemName    = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemName").GetComponentsInChildren <UILabel>(true)[0];
        m_lblOldServerItemNum     = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemNum").GetComponentsInChildren <UILabel>(true)[0];
        m_lblOldServerItemCD      = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemCD").GetComponentsInChildren <UILabel>(true)[0];
        m_lblOldServerCostText    = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemCostNum").GetComponentsInChildren <UILabel>(true)[0];
        m_spOldServerCostSign     = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerCostImg").GetComponentsInChildren <UISprite>(true)[0];
        m_spOldServerItemFG       = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemFG").GetComponentsInChildren <UISprite>(true)[0];
        //m_spOldServerItemFG.selfRefresh = false;
        m_spOldServerItemBG  = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemBG").GetComponentsInChildren <UISprite>(true)[0];
        m_tsOldServerBuySign = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerBuySign").GetComponentsInChildren <TweenScale>(true)[0];

        m_tsLeftGetSign  = m_spLeftGetSign.GetComponentsInChildren <TweenScale>(true)[0];
        m_tsRightGetSign = m_spRightGetSign.GetComponentsInChildren <TweenScale>(true)[0];

        m_trans1Pos = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList1Pos");
        m_trans2Pos = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList2Pos");
        m_trans3Pos = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList3Pos");
        m_trans4Pos = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList4Pos");

        m_goLeftItemList  = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList").gameObject;
        m_goRightItemList = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightNewServer/LoginRewardGridRightNewServerItemList").gameObject;

        m_goOldServerPart = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer").gameObject;
        m_goNewServerPart = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightNewServer").gameObject;

        m_mbBuy = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerBuyBtn").GetComponentsInChildren <MogoButton>(true)[0];
        m_mbGet = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftGetBtn").GetComponentsInChildren <MogoButton>(true)[0];

        m_mbBuy.clickHandler += OnBuyBtnUp;
        m_mbGet.clickHandler += OnGetBtnUp;

        for (int i = 0; i < 6; ++i)
        {
            m_arrLeftItem[i]     = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList/LoginRewardGridLeftItem" + i).gameObject;
            m_arrrLeftItemNum[i] = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList/LoginRewardGridLeftItem" + i
                                                      + "/LoginRewardGridLeftItem" + i + "Num").GetComponentsInChildren <UILabel>(true)[0];
            m_arrLeftItemGetSigin[i] = m_myTransform.Find("LoginRewardGridLeft/LoginRewardGridLeftItemList/LoginRewardGridLeftItem" + i
                                                          + "/LoginRewardGridLeftItem" + i + "GetSign").gameObject;
            m_arrLeftItemImg[i] = m_arrLeftItem[i].transform.Find("LoginRewardGridLeftItem" + i + "FG").GetComponentsInChildren <UISprite>(true)[0];
            //m_arrLeftItemImg[i].selfRefresh = false;
            m_goLeftItemGridList.Add(m_arrLeftItem[i].AddComponent <InventoryGrid>());
        }

        for (int i = 0; i < 2; ++i)
        {
            m_arrRightItem[i] = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightNewServer/LoginRewardGridRightNewServerItemList/LoginRewardGridLeftItem" + i).gameObject;
        }

        m_oldServerItemFGImgGrid = m_myTransform.Find("LoginRewardGridRight/LoginRewardGridRightOldServer/LoginRewardGridRightOldServerItemBG").gameObject.AddComponent <InventoryGrid>();;
    }