コード例 #1
0
    private void InitTongListUIObj()
    {
        m_otherTong      = GetUIChild("OtherTong");
        m_tongListCamera = GetUIChild("TongListCamera");
        m_tongListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("Camera").GetComponent <Camera>();
        m_tongListCameraBegin              = GetUIChild("TongListPosBegin");
        tonglistPageHeight                 = GetUIChild("TongListBG").transform.localScale.y;
        m_tongListRoot                     = GetUIChild("TongList");
        m_tongListBtnList                  = m_tongListRoot.GetComponent <MogoSingleButtonList>();
        m_tongListPageNum                  = GetUIChild("TongListPageNum").GetComponent <UILabel>();
        m_tongListDragCamera               = m_tongListCamera.GetComponent <MyDragableCamera>();
        m_tongListDragCamera.MovePageDone +=
            (() =>
        {
            OnListPageMove(m_tongListPageNum, m_tongListDragCamera, m_tongDataList.Count, TONG_LIST_GRID_GAP, tonglistPageHeight);
        });
        m_createTong          = GetUIChild("CreateTong");
        m_createTongCostLbl   = GetUIChild("CreateTongCostNumLbl").GetComponent <UILabel>();
        m_createTongInputName = GetUIChild("CreateTongInputlbl").GetComponent <UILabel>();

        //test data
        //m_tongDataList = new List<TongData>();
        //for (int i = 0; i < 21; i++)
        //{
        //    TongData tong = new TongData() { level = i + "", name = "name" + i, num = (i + 1) + "" };
        //    m_tongDataList.Add(tong);
        //}
    }
コード例 #2
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Camera camera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        m_camActivityGridList = FindTransform("TimeLimitActivityGridListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_camActivityGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = camera;
        m_dragableCameraActivityGridList = m_camActivityGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCameraActivityGridList.LeftArrow = FindTransform("TimeLimitActivityUIActivityListArrowL").gameObject;
        m_dragableCameraActivityGridList.RightArrow = FindTransform("TimeLimitActivityUIActivityListArrowR").gameObject;
        m_goActivityGridList = FindTransform("TimeLimitActivityGridList").gameObject;
        m_goTimeLimitActivityUIActivityListUI = FindTransform("TimeLimitActivityUIActivityList").gameObject;
        m_goGOTimeLimitActivityUIActivityListPage = FindTransform("GOTimeLimitActivityUIActivityListPage").gameObject;

        m_goTimeLimitActivityUIActivityInfoListUI = FindTransform("TimeLimitActivityUIActivityInfoList").gameObject;
        m_tranTimeLimitActivityInfoGridList = FindTransform("TimeLimitActivityInfoGridList");
        m_infoGridListMogoListImproved = m_tranTimeLimitActivityInfoGridList.GetComponentsInChildren<MogoListImproved>(true)[0];
        m_infoGridListMogoListImproved.LeftArrow = FindTransform("TimeLimitActivityUIActivityInfoArrowL").gameObject;
        m_infoGridListMogoListImproved.RightArrow = FindTransform("TimeLimitActivityUIActivityInfoArrowR").gameObject;

        m_timeLimitActivityGridListCameraFX = FindTransform("TimeLimitActivityGridListCameraFX").GetComponentsInChildren<Camera>(true)[0];
        m_timeLimitActivityGridListCameraFX.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = camera;
        m_goTimeLimitActivityGridListParticleAnimRoot = FindTransform("TimeLimitActivityGridListParticleAnimRoot").gameObject;

        m_goTimeLimitActivityInfoGridListFx = FindTransform("TimeLimitActivityInfoGridListFx").gameObject;

        Initialize();

        EventDispatcher.TriggerEvent(Events.OperationEvent.GetActivityMessage);
    }   
コード例 #3
0
    private void ResetTongListCamera()
    {
        int pageNum = (int)(TONG_LIST_GRID_GAP * m_tongDataList.Count / tonglistPageHeight) + 1;


        m_tongListCamera.localPosition = m_tongListCameraBegin.localPosition;

        MyDragableCamera camera = m_tongListCamera.GetComponent <MyDragableCamera>();

        camera.transformList = new List <Transform>();
        for (int i = 0; i < pageNum; i++)
        {
            GameObject go = new GameObject();
            Utils.MountToSomeObjWithoutPosChange(go.transform, m_tongListRoot);
            go.transform.localPosition = new Vector3(m_tongListCameraBegin.localPosition.x, m_tongListCameraBegin.localPosition.y - TONG_LIST_GRID_GAP * TONG_LIST_PAGE_GRID_NUM * i, m_tongListCameraBegin.localPosition.z);
            camera.transformList.Add(go.transform);
        }
        if (pageNum <= 1)
        {
            GameObject go = new GameObject();
            Utils.MountToSomeObjWithoutPosChange(go.transform, m_tongListRoot);
            go.transform.localPosition = new Vector3(m_tongListCameraBegin.localPosition.x, m_tongListCameraBegin.localPosition.y, m_tongListCameraBegin.localPosition.z);
            camera.transformList.Add(go.transform);
        }
    }
コード例 #4
0
    void Awake()
    {
        instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);        

        m_spRefreshCtrl = FindTransform("ChallengeUIRefreshCtrl").GetComponentsInChildren<UISprite>(true)[0];

        m_tranChallengeGridList = FindTransform("ChallengeGridList");
        m_gridListCamera = FindTransform("ChallengeGridListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_gridListCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentInChildren<Camera>();
        m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_gridListMyDragableCamera.LeftArrow = FindTransform("ChallengeUIArrowL").gameObject;
        m_gridListMyDragableCamera.RightArrow = FindTransform("ChallengeUIArrowR").gameObject;
        m_goChallengeUIPageDOTList = FindTransform("ChallengeUIPageDOTList").gameObject;

        gridImgName[(int)ChallengeGridID.ClimbTower] = "tz-slzt";
        gridImgName[(int)ChallengeGridID.DoorOfBury] = "tz-jmzm";
        gridImgName[(int)ChallengeGridID.Sanctuary] = "tz-tfjl";
        //gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-tfjl";
        //gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-tfjl";
        gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-flds";
        gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-zjns";
        gridImgName[(int)ChallengeGridID.OccupyTower] = "tz-3v3"; 

        Initialize();
    }    
コード例 #5
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Camera camera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_camActivityGridList = FindTransform("TimeLimitActivityGridListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_camActivityGridList.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = camera;
        m_dragableCameraActivityGridList            = m_camActivityGridList.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCameraActivityGridList.LeftArrow  = FindTransform("TimeLimitActivityUIActivityListArrowL").gameObject;
        m_dragableCameraActivityGridList.RightArrow = FindTransform("TimeLimitActivityUIActivityListArrowR").gameObject;
        m_goActivityGridList = FindTransform("TimeLimitActivityGridList").gameObject;
        m_goTimeLimitActivityUIActivityListUI     = FindTransform("TimeLimitActivityUIActivityList").gameObject;
        m_goGOTimeLimitActivityUIActivityListPage = FindTransform("GOTimeLimitActivityUIActivityListPage").gameObject;

        m_goTimeLimitActivityUIActivityInfoListUI = FindTransform("TimeLimitActivityUIActivityInfoList").gameObject;
        m_tranTimeLimitActivityInfoGridList       = FindTransform("TimeLimitActivityInfoGridList");
        m_infoGridListMogoListImproved            = m_tranTimeLimitActivityInfoGridList.GetComponentsInChildren <MogoListImproved>(true)[0];
        m_infoGridListMogoListImproved.LeftArrow  = FindTransform("TimeLimitActivityUIActivityInfoArrowL").gameObject;
        m_infoGridListMogoListImproved.RightArrow = FindTransform("TimeLimitActivityUIActivityInfoArrowR").gameObject;

        m_timeLimitActivityGridListCameraFX = FindTransform("TimeLimitActivityGridListCameraFX").GetComponentsInChildren <Camera>(true)[0];
        m_timeLimitActivityGridListCameraFX.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = camera;
        m_goTimeLimitActivityGridListParticleAnimRoot = FindTransform("TimeLimitActivityGridListParticleAnimRoot").gameObject;

        m_goTimeLimitActivityInfoGridListFx = FindTransform("TimeLimitActivityInfoGridListFx").gameObject;

        Initialize();

        EventDispatcher.TriggerEvent(Events.OperationEvent.GetActivityMessage);
    }
コード例 #6
0
    void Awake()
    {
        instance      = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_spRefreshCtrl = FindTransform("ChallengeUIRefreshCtrl").GetComponentsInChildren <UISprite>(true)[0];

        m_tranChallengeGridList = FindTransform("ChallengeGridList");
        m_gridListCamera        = FindTransform("ChallengeGridListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_gridListCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentInChildren <Camera>();
        m_gridListMyDragableCamera            = m_gridListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_gridListMyDragableCamera.LeftArrow  = FindTransform("ChallengeUIArrowL").gameObject;
        m_gridListMyDragableCamera.RightArrow = FindTransform("ChallengeUIArrowR").gameObject;
        m_goChallengeUIPageDOTList            = FindTransform("ChallengeUIPageDOTList").gameObject;

        gridImgName[(int)ChallengeGridID.ClimbTower] = "tz-slzt";
        gridImgName[(int)ChallengeGridID.DoorOfBury] = "tz-jmzm";
        gridImgName[(int)ChallengeGridID.Sanctuary]  = "tz-tfjl";
        //gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-tfjl";
        //gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-tfjl";
        gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-flds";
        gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-zjns";
        gridImgName[(int)ChallengeGridID.OccupyTower] = "tz-3v3";

        Initialize();
    }
コード例 #7
0
    void Awake()
    {
        Instance = this;
        base.Init();
        m_tab = GetUIChild("EquipExchangeTab").GetComponent<MogoSingleButtonList>();

        Transform listRoot = GetUIChild("EquipExchangeEquipList");

        m_tranDragableCamera = GetUIChild("EquipExchangeEquipListCamera");
        m_dragableCamera = m_tranDragableCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow = GetUIChild("EquipExchangeArrowLeft").gameObject;
        m_dragableCamera.RightArrow = GetUIChild("EquipExchangeArrowRight").gameObject;

        Transform dragCameraBegin = GetUIChild("EquipExchangeEquipListCameraPosBegin");
        GetUIChild("EquipExchangeContainerCloseBtn").gameObject.AddComponent<MogoUIListener>().MogoOnClick = () => { Hide(); };

        m_listView = new MogoListView(m_tranDragableCamera, listRoot, dragCameraBegin, GRID_PREFAB_NAME,
            true, GRID_GAP, GRID_NUM_PER_PAGE, m_objList);

        m_lblGoldNum = GetUIChild("EquipExchangeResourceGoldNumLbl").GetComponent<UILabel>();
        m_lblMaterilNum = GetUIChild("EquipExchangeResourceDiamondNumLbl").GetComponent<UILabel>();
        m_imgMaterial = GetUIChild("EquipExchangeResourceDiamondIcon").GetComponent<UISprite>();

        GetUIChild("EquipExchangeTabBtn1").gameObject.AddComponent<MogoUIListener>().MogoOnClick = () =>
        {
            if (OnTabSelect != null) OnTabSelect(0);
        };
        GetUIChild("EquipExchangeTabBtn2").gameObject.AddComponent<MogoUIListener>().MogoOnClick = () =>
        {
            if (OnTabSelect != null) OnTabSelect(1);
        };


        gameObject.SetActive(false);
    }
コード例 #8
0
    private string GetPageNumStr(MyDragableCamera camera, int pageNum)
    {
        //Mogo.Util.LoggerHelper.Debug("camera:" + camera.gameObject.name);
        //Mogo.Util.LoggerHelper.Debug("camera.GetCurrentPage():" + camera.GetCurrentPage() + ",pageNum:" + pageNum);
        int currentPage = camera.GetCurrentPage() + 1;

        if (currentPage > pageNum)
        {
            currentPage = pageNum;
        }
        return(currentPage + "/" + pageNum);
    }
コード例 #9
0
    void Awake()
    {
        m_myTransform = transform;
        FillFullNameData(m_myTransform);
        m_instance = m_myTransform.GetComponentsInChildren <InstanceMissionChooseUIViewManager>(true)[0];

        m_lblSweepNum = m_myTransform.Find(m_widgetToFullName["InstanceLeftChallengeNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblResetNum = m_myTransform.Find(m_widgetToFullName["InstanceLeftResetNum"]).GetComponentsInChildren <UILabel>(true)[0];

        m_camInstanceMissionChooseUI   = FindTransform("InstanceMissionChooseUICamera").GetComponentsInChildren <Camera>(true)[0];
        m_uicamInstanceMissionChooseUI = m_myTransform.Find(m_widgetToFullName["InstanceMissionChooseUICamera"]).GetComponentsInChildren <UICamera>(true)[0];

        m_goInstanceMissionChooseUIMapListGrid = m_myTransform.Find(m_widgetToFullName["InstanceMissionChooseUIMapListGrid"]).gameObject;
        m_tranInstanceMissionChooseUIPageDOT   = FindTransform("InstanceMissionChooseUIPageDOT");
        m_goGOInstanceMissionChooseUI          = m_myTransform.Find(m_widgetToFullName["GOInstanceMissionChooseUI"]).gameObject;
        m_goGOInstanceMissionChooseUI.SetActive(false);

        m_goGOInstanceMissionChooseUIMapList = FindTransform("GOInstanceMissionChooseUIMapList").gameObject;
        m_goGOInstanceMissionChooseUINormal  = FindTransform("GOInstanceMissionChooseUINormal").gameObject;
        m_goGOInstanceMissionChooseUIRandom  = FindTransform("GOInstanceMissionChooseUIRandom").gameObject;

        m_chooseMogoSingleButtonList = FindTransform("InstanceMissionChooseUIChoose").GetComponentsInChildren <MogoSingleButtonList>(true)[0];
        m_chooseMogoSingleButtonList.SetCurrentDownButton(0);
        m_lblInstanceMissionChooseUIChooseNormalText     = FindTransform("InstanceMissionChooseUIChooseNormalText").GetComponentsInChildren <UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseNormalTextDown = FindTransform("InstanceMissionChooseUIChooseNormalTextDown").GetComponentsInChildren <UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseRandomText     = FindTransform("InstanceMissionChooseUIChooseRandomText").GetComponentsInChildren <UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseRandomTextDown = FindTransform("InstanceMissionChooseUIChooseRandomTextDown").GetComponentsInChildren <UILabel>(true)[0];
        m_lblInstanceMissionChooseUIRandomBtnEnterTip    = FindTransform("InstanceMissionChooseUIRandomBtnEnterTip").GetComponentsInChildren <UILabel>(true)[0];

        m_spInstanceMissionChooseUIChooseRandomBGUp   = FindTransform("InstanceMissionChooseUIChooseRandomBGUp").GetComponentsInChildren <UISprite>(true)[0];
        m_spInstanceMissionChooseUIChooseRandomBGDown = FindTransform("InstanceMissionChooseUIChooseRandomBGDown").GetComponentsInChildren <UISprite>(true)[0];

        m_dragCamera = m_myTransform.Find(m_widgetToFullName["InstanceMissionChooseUIMapListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        Camera SourceCamera = GameObject.Find("MogoMainUI").transform.Find("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = SourceCamera;

        m_dragableCameraMapList            = m_dragCamera.transform.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCameraMapList.LeftArrow  = FindTransform("InstanceMissionChooseUIArrowL").gameObject;
        m_dragableCameraMapList.RightArrow = FindTransform("InstanceMissionChooseUIArrowR").gameObject;

        FillNewInstanceUIChooseGridData();

        // 随机副本特效
        m_goInstanceMissionChooseUIRandomFx = FindTransform("InstanceMissionChooseUIRandomFx").gameObject;

        // ChineseData
        m_lblInstanceMissionChooseUIChooseRandomText.text     = LanguageData.GetContent(46975);
        m_lblInstanceMissionChooseUIChooseRandomTextDown.text = LanguageData.GetContent(46975);
        m_lblInstanceMissionChooseUIRandomBtnEnterTip.text    = LanguageData.GetContent(46976);

        Initialize();
    }
コード例 #10
0
ファイル: MogoNotice2.cs プロジェクト: lbddk/ahzs-client
    void Awake()
    {
        Instance = GetComponent<MogoNotice2>();
        FillFullNameData(transform);

        m_sourceCamera = GameObject.Find("GlobleUICamera").GetComponent<Camera>();
        gameObject.GetComponent<UIStretch>().uiCamera = m_sourceCamera;
        m_listCamera = GetTransformByName("NoticeListCamera").gameObject.GetComponent<Camera>();
        m_listDragableCamera = m_listCamera.GetComponent<MyDragableCamera>();
        GetTransformByName("NoticeListCamera").GetComponent<UIViewport>().sourceCamera = m_sourceCamera;

        m_titleLbl = GetTransformByName("BannerTitle").GetComponent<UILabel>();
        m_dateLbl = GetTransformByName("BannerDate").GetComponent<UILabel>();
        m_contentLbl = GetTransformByName("ContentLbl").GetComponent<UILabel>();
        m_listRoot = GetTransformByName("NoticeList");
        m_buttonList = m_listRoot.GetComponent<MogoSingleButtonList>();
        m_listBegin = GetTransformByName("NoticeListPosBegin");
        m_listBeginPos = m_listBegin.localPosition;

        m_listCameraBegin = GetTransformByName("NoticeListCameraPosBegin");
        GetTransformByName("NoticeBoxClose").gameObject.AddComponent<MogoBgClose>();


        m_contentCamera = GetTransformByName("ContentCamera").GetComponent<Camera>();
        m_contentCamera.gameObject.GetComponent<UIViewport>().sourceCamera = m_sourceCamera;

        Transform contentArea = GetTransformByName("ContentArea");
        m_contentBR = GetTransformByName("ContentAreaBR");
        m_contentTL = GetTransformByName("ContentAreaTL");
        contentArea.GetComponent<MyDragCamera>().RelatedCamera = m_contentCamera;
        m_contentAreaHeight = contentArea.localScale.y;

        m_contentCameraBegin = GetTransformByName("ContentCameraPosBegin");

        Reset();


        //m_callback = new WebViewCallbackTest();

        //m_webview = GetComponent<WebViewBehavior>();

        //if (m_webview != null)
        //{
        //    m_webview.setCallback(m_callback);
        //}

        gameObject.SetActive(false);

    }
コード例 #11
0
ファイル: MogoNotice2.cs プロジェクト: isoundy000/ahzs-client
    void Awake()
    {
        Instance = GetComponent <MogoNotice2>();
        FillFullNameData(transform);

        m_sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        gameObject.GetComponent <UIStretch>().uiCamera = m_sourceCamera;
        m_listCamera         = GetTransformByName("NoticeListCamera").gameObject.GetComponent <Camera>();
        m_listDragableCamera = m_listCamera.GetComponent <MyDragableCamera>();
        GetTransformByName("NoticeListCamera").GetComponent <UIViewport>().sourceCamera = m_sourceCamera;

        m_titleLbl     = GetTransformByName("BannerTitle").GetComponent <UILabel>();
        m_dateLbl      = GetTransformByName("BannerDate").GetComponent <UILabel>();
        m_contentLbl   = GetTransformByName("ContentLbl").GetComponent <UILabel>();
        m_listRoot     = GetTransformByName("NoticeList");
        m_buttonList   = m_listRoot.GetComponent <MogoSingleButtonList>();
        m_listBegin    = GetTransformByName("NoticeListPosBegin");
        m_listBeginPos = m_listBegin.localPosition;

        m_listCameraBegin = GetTransformByName("NoticeListCameraPosBegin");
        GetTransformByName("NoticeBoxClose").gameObject.AddComponent <MogoBgClose>();


        m_contentCamera = GetTransformByName("ContentCamera").GetComponent <Camera>();
        m_contentCamera.gameObject.GetComponent <UIViewport>().sourceCamera = m_sourceCamera;

        Transform contentArea = GetTransformByName("ContentArea");

        m_contentBR = GetTransformByName("ContentAreaBR");
        m_contentTL = GetTransformByName("ContentAreaTL");
        contentArea.GetComponent <MyDragCamera>().RelatedCamera = m_contentCamera;
        m_contentAreaHeight = contentArea.localScale.y;

        m_contentCameraBegin = GetTransformByName("ContentCameraPosBegin");

        Reset();


        //m_callback = new WebViewCallbackTest();

        //m_webview = GetComponent<WebViewBehavior>();

        //if (m_webview != null)
        //{
        //    m_webview.setCallback(m_callback);
        //}

        gameObject.SetActive(false);
    }
コード例 #12
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranEquipRecommendUIEquipList = FindTransform("EquipRecommendUIEquipList");
        m_equipListCamera = FindTransform("EquipRecommendUIEquipListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_equipListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("Camera").GetComponent<Camera>();
        m_dragableCamera = m_equipListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_equipListcameraInitPos = m_equipListCamera.transform.localPosition;
        m_goEquipRecommendUIArrowB = FindTransform("EquipRecommendUIArrowB").gameObject;

        FindTransform("EquipRecommendUIBtnClose").gameObject.AddComponent<EquipRecommendUIButton>();

        Initialize();
    }
コード例 #13
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranEquipRecommendUIEquipList = FindTransform("EquipRecommendUIEquipList");
        m_equipListCamera = FindTransform("EquipRecommendUIEquipListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_equipListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("Camera").GetComponent <Camera>();
        m_dragableCamera           = m_equipListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_equipListcameraInitPos   = m_equipListCamera.transform.localPosition;
        m_goEquipRecommendUIArrowB = FindTransform("EquipRecommendUIArrowB").gameObject;

        FindTransform("EquipRecommendUIBtnClose").gameObject.AddComponent <EquipRecommendUIButton>();

        Initialize();
    }
コード例 #14
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_dragCamera = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].topLeft      = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].bottomRight  = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableCamera            = m_dragCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow  = FindTransform("ComposeDialogIconListArrowU").gameObject;
        m_dragableCamera.RightArrow = FindTransform("ComposeDialogIconListArrowD").gameObject;

        m_transPanelTable = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListPanelTable"]);

        m_goGOComposeDialogBodyPearlUp    = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlUp"]).gameObject;
        m_goGOComposeDialogBodyPearlLeft  = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlLeft"]).gameObject;
        m_goGOComposeDialogBodyPearlRight = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlRight"]).gameObject;
        m_goGOComposeDialogBodyPearlFinal = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlFinal"]).gameObject;
        m_goGOComposeDialogBodyPearlUp.AddComponent <InventoryGrid>();
        m_goGOComposeDialogBodyPearlLeft.AddComponent <InventoryGrid>();
        m_goGOComposeDialogBodyPearlRight.AddComponent <InventoryGrid>();
        m_goGOComposeDialogBodyPearlFinal.AddComponent <InventoryGrid>();

        m_ssComposePearlLeft  = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlLeft"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_ssComposePearlRight = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlRight"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_ssComposePearlUp    = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlUp"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_ssComposePearlFinal = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlFinal"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        m_goComposeNowBtn = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogComposeNow"]).gameObject;
        m_goComposeBtn    = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogCompose"]).gameObject;

        for (int i = 0; i < 9; ++i)
        {
            m_bGridStatus[i] = false;
        }

        m_texUIBG = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyBGThing0"]).GetComponentsInChildren <UITexture>(true)[0];
    }
コード例 #15
0
    void Awake()
    {
        Instance = this;
        base.Init();
        m_tab = GetUIChild("EquipExchangeTab").GetComponent <MogoSingleButtonList>();

        Transform listRoot = GetUIChild("EquipExchangeEquipList");

        m_tranDragableCamera        = GetUIChild("EquipExchangeEquipListCamera");
        m_dragableCamera            = m_tranDragableCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow  = GetUIChild("EquipExchangeArrowLeft").gameObject;
        m_dragableCamera.RightArrow = GetUIChild("EquipExchangeArrowRight").gameObject;

        Transform dragCameraBegin = GetUIChild("EquipExchangeEquipListCameraPosBegin");

        GetUIChild("EquipExchangeContainerCloseBtn").gameObject.AddComponent <MogoUIListener>().MogoOnClick = () => { Hide(); };

        m_listView = new MogoListView(m_tranDragableCamera, listRoot, dragCameraBegin, GRID_PREFAB_NAME,
                                      true, GRID_GAP, GRID_NUM_PER_PAGE, m_objList);

        m_lblGoldNum    = GetUIChild("EquipExchangeResourceGoldNumLbl").GetComponent <UILabel>();
        m_lblMaterilNum = GetUIChild("EquipExchangeResourceDiamondNumLbl").GetComponent <UILabel>();
        m_imgMaterial   = GetUIChild("EquipExchangeResourceDiamondIcon").GetComponent <UISprite>();

        GetUIChild("EquipExchangeTabBtn1").gameObject.AddComponent <MogoUIListener>().MogoOnClick = () =>
        {
            if (OnTabSelect != null)
            {
                OnTabSelect(0);
            }
        };
        GetUIChild("EquipExchangeTabBtn2").gameObject.AddComponent <MogoUIListener>().MogoOnClick = () =>
        {
            if (OnTabSelect != null)
            {
                OnTabSelect(1);
            }
        };


        gameObject.SetActive(false);
    }
コード例 #16
0
    public void LoadResourceInsteadOfAwake()
    {
        if (m_bLoadResourceInsteadOfAwake)
            return;

        m_bLoadResourceInsteadOfAwake = true;

        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList = FindTransform("DragonMatchRecordUIGridList");
        m_gridListCamera = FindTransform("DragonMatchRecordUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_camInitPos = m_gridListCamera.transform.localPosition;
        m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_goDragonMatchRecordUIArrow = FindTransform("DragonMatchRecordUIArrow").gameObject;
        m_lblDragonMatchRecordUITime = FindTransform("DragonMatchRecordUITime").GetComponentsInChildren<UILabel>(true)[0];

        Initialize();
    }
コード例 #17
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);
    
        m_camLoginRewardGridList = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_dragableCameraLoginRewardGridList = m_camLoginRewardGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_goLoginRewardGridList = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridList"]).gameObject;
        m_uilLoginTitle = m_myTransform.FindChild(m_widgetToFullName["LoginRewardDialogTitle"]).GetComponentsInChildren<UILabel>(true)[0];
        m_camLoginRewardGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        // 提示箭头
        m_dragableCameraLoginRewardGridList.LeftArrow = FindTransform("LoginRewardUIArrowL").gameObject;
        m_dragableCameraLoginRewardGridList.RightArrow = FindTransform("LoginRewardUIArrowR").gameObject;

        Initialize();

        EventDispatcher.TriggerEvent(Events.OperationEvent.GetLoginMessage);
        // EventDispatcher.TriggerEvent(MarketEvent.DownloadLoginMarket);
    }
コード例 #18
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_camLoginRewardGridList            = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_dragableCameraLoginRewardGridList = m_camLoginRewardGridList.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_goLoginRewardGridList             = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridList"]).gameObject;
        m_uilLoginTitle = m_myTransform.FindChild(m_widgetToFullName["LoginRewardDialogTitle"]).GetComponentsInChildren <UILabel>(true)[0];
        m_camLoginRewardGridList.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren <Camera>(true)[0];

        // 提示箭头
        m_dragableCameraLoginRewardGridList.LeftArrow  = FindTransform("LoginRewardUIArrowL").gameObject;
        m_dragableCameraLoginRewardGridList.RightArrow = FindTransform("LoginRewardUIArrowR").gameObject;

        Initialize();

        EventDispatcher.TriggerEvent(Events.OperationEvent.GetLoginMessage);
        // EventDispatcher.TriggerEvent(MarketEvent.DownloadLoginMarket);
    }
コード例 #19
0
    public void LoadResourceInsteadOfAwake()
    {
        if (m_bLoadResourceInsteadOfAwake)
        {
            return;
        }

        m_bLoadResourceInsteadOfAwake = true;

        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList            = FindTransform("DragonMatchRecordUIGridList");
        m_gridListCamera             = FindTransform("DragonMatchRecordUIGridListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_camInitPos                 = m_gridListCamera.transform.localPosition;
        m_gridListMyDragableCamera   = m_gridListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_goDragonMatchRecordUIArrow = FindTransform("DragonMatchRecordUIArrow").gameObject;
        m_lblDragonMatchRecordUITime = FindTransform("DragonMatchRecordUITime").GetComponentsInChildren <UILabel>(true)[0];

        Initialize();
    }
コード例 #20
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList = FindTransform("EnergyNoEnoughUIGridList");
        m_gridListCamera = FindTransform("EnergyNoEnoughUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_camInitPos = m_gridListCamera.transform.localPosition;

        m_dragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow = FindTransform("EnergyNoEnoughUIArrowUp").gameObject;
        m_dragableCamera.RightArrow = FindTransform("EnergyNoEnoughUIArrowDown").gameObject;

        m_lblEnergyNoEnoughUIProgressBarText = FindTransform("EnergyNoEnoughUIProgressBarText").GetComponentsInChildren<UILabel>(true)[0];
        m_lblEnergyNoEnoughUITipText = FindTransform("EnergyNoEnoughUITipText").GetComponentsInChildren<UILabel>(true)[0];
        SetEnergyRecover();
        m_goEnergyNoEnoughUIProgressBar = FindTransform("EnergyNoEnoughUIProgressBar").gameObject;
        m_chooseWayMogoSingleButtonList = FindTransform("EnergyNoEnoughUIChooseWay").GetComponentsInChildren<MogoSingleButtonList>(true)[0];

        FindTransform("EnergyNoEnoughUIBtnClose").gameObject.AddComponent<EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay1").gameObject.AddComponent<EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay2").gameObject.AddComponent<EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay3").gameObject.AddComponent<EnergyNoEnoughUIButton>();

        m_tabTitleLabelList[0] = FindTransform("ChooseWay1TextTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_tabTitleLabelList[1] = FindTransform("ChooseWay2TextTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_tabTitleLabelList[2] = FindTransform("ChooseWay3TextTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_tabDescLabelList[0] = FindTransform("ChooseWay1TextDesc").GetComponentsInChildren<UILabel>(true)[0];
        m_tabDescLabelList[1] = FindTransform("ChooseWay2TextDesc").GetComponentsInChildren<UILabel>(true)[0];
        m_tabDescLabelList[2] = FindTransform("ChooseWay3TextDesc").GetComponentsInChildren<UILabel>(true)[0];
        for (int i = 0; i <= 2; i++)
        {
             EnergyNoEnoughUITabUp(i);
        }
        CurrentDownTab = (int)EnergyNoEnoughUITab.BuyEnergyTab;

        Initialize();
    }
コード例 #21
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList = FindTransform("EnergyNoEnoughUIGridList");
        m_gridListCamera  = FindTransform("EnergyNoEnoughUIGridListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_camInitPos      = m_gridListCamera.transform.localPosition;

        m_dragableCamera            = m_gridListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow  = FindTransform("EnergyNoEnoughUIArrowUp").gameObject;
        m_dragableCamera.RightArrow = FindTransform("EnergyNoEnoughUIArrowDown").gameObject;

        m_lblEnergyNoEnoughUIProgressBarText = FindTransform("EnergyNoEnoughUIProgressBarText").GetComponentsInChildren <UILabel>(true)[0];
        m_lblEnergyNoEnoughUITipText         = FindTransform("EnergyNoEnoughUITipText").GetComponentsInChildren <UILabel>(true)[0];
        SetEnergyRecover();
        m_goEnergyNoEnoughUIProgressBar = FindTransform("EnergyNoEnoughUIProgressBar").gameObject;
        m_chooseWayMogoSingleButtonList = FindTransform("EnergyNoEnoughUIChooseWay").GetComponentsInChildren <MogoSingleButtonList>(true)[0];

        FindTransform("EnergyNoEnoughUIBtnClose").gameObject.AddComponent <EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay1").gameObject.AddComponent <EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay2").gameObject.AddComponent <EnergyNoEnoughUIButton>();
        FindTransform("ChooseWay3").gameObject.AddComponent <EnergyNoEnoughUIButton>();

        m_tabTitleLabelList[0] = FindTransform("ChooseWay1TextTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_tabTitleLabelList[1] = FindTransform("ChooseWay2TextTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_tabTitleLabelList[2] = FindTransform("ChooseWay3TextTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_tabDescLabelList[0]  = FindTransform("ChooseWay1TextDesc").GetComponentsInChildren <UILabel>(true)[0];
        m_tabDescLabelList[1]  = FindTransform("ChooseWay2TextDesc").GetComponentsInChildren <UILabel>(true)[0];
        m_tabDescLabelList[2]  = FindTransform("ChooseWay3TextDesc").GetComponentsInChildren <UILabel>(true)[0];
        for (int i = 0; i <= 2; i++)
        {
            EnergyNoEnoughUITabUp(i);
        }
        CurrentDownTab = (int)EnergyNoEnoughUITab.BuyEnergyTab;

        Initialize();
    }
コード例 #22
0
    private void ResetListCamera(int pageNum, Transform dragCamera, Transform original, Transform root, bool isHorizontal = false, int gap = MYTONG_MEMBERLIST_GRID_GAP, int num = 4)
    {
        dragCamera.localPosition = original.localPosition;

        MyDragableCamera camera = dragCamera.GetComponent <MyDragableCamera>();

        camera.transformList = new List <Transform>();
        for (int i = 0; i < pageNum; i++)
        {
            GameObject go = new GameObject();
            Utils.MountToSomeObjWithoutPosChange(go.transform, root);
            if (isHorizontal)
            {
                go.transform.localPosition = new Vector3(original.localPosition.x + gap * num * i, original.localPosition.y, original.localPosition.z);
            }
            else
            {
                go.transform.localPosition = new Vector3(original.localPosition.x, original.localPosition.y - gap * num * i, original.localPosition.z);
            }
            camera.transformList.Add(go.transform);
        }
        if (pageNum <= 1)
        {
            GameObject go = new GameObject();
            Utils.MountToSomeObjWithoutPosChange(go.transform, root);

            if (isHorizontal)
            {
                go.transform.localPosition = new Vector3(original.localPosition.x, original.localPosition.y, original.localPosition.z);
            }
            else
            {
                go.transform.localPosition = new Vector3(original.localPosition.x, original.localPosition.y, original.localPosition.z);
            }

            camera.transformList.Add(go.transform);
        }
    }
コード例 #23
0
    public void ResetListCamera(int gridNum)
    {
        MyDragableCamera dragableCamera = m_tranDragableCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];

        dragableCamera.DestroyMovePagePosList(); // 删除翻页点

        int temp = (gridNum - 1);

        if (temp < 0)
        {
            temp = 0;
        }
        int pageNum = (int)(temp / m_numPerPage) + 1;

        m_tranDragableCamera.GetComponent <TweenPosition>().to = m_dragCameraBeginPos;
        m_tranDragableCamera.localPosition = m_dragCameraBeginPos;

        dragableCamera.transformList = new List <Transform>();
        for (int i = 0; i < pageNum; i++)
        {
            GameObject go = new GameObject();
            go.name = string.Concat("CameraMovePagePos", i);

            Utils.MountToSomeObjWithoutPosChange(go.transform, m_listRoot);

            if (m_isHorizontal)
            {
                go.transform.localPosition = new Vector3(m_dragCameraBeginPos.x + m_gap * m_numPerPage * i, m_dragCameraBeginPos.y, m_dragCameraBeginPos.z);
            }
            else
            {
                go.transform.localPosition = new Vector3(m_dragCameraBeginPos.x, m_dragCameraBeginPos.y - m_gap * m_numPerPage * i, m_dragCameraBeginPos.z);
            }

            dragableCamera.transformList.Add(go.transform);
            dragableCamera.SetArrow();
        }
    }
コード例 #24
0
    void Awake()
    {
        m_myTransform = transform;
        m_instance = m_myTransform.GetComponentsInChildren<DoorOfBuryUIViewManager>(true)[0];
        FillFullNameData(m_myTransform);        

        m_friendGridList = FindTransform("DoorOfBuryChooseFriendList");
        m_friendGridDCam = FindTransform("DoorOfBuryChooseFriendListCamera").GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_lblCountDownTime = FindTransform("DoorOfBuryChooseCountDown").GetComponentsInChildren<UILabel>(true)[0];
        m_lblCountDownTime.color = SystemUIColorManager.RED;
        m_lblTitle = FindTransform("DoorOfBuryChooseTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_goGODoorOfBuryChooseHasGrid = FindTransform("GODoorOfBuryChooseHasGrid").gameObject;
        m_goGODoorOfBuryChooseNoGrid = FindTransform("GODoorOfBuryChooseNoGrid").gameObject;

        Camera camera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_friendGridDCam.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = camera;
        FindTransform("TopRight").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera;

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

        Initialize();
    }
コード例 #25
0
    void Awake()
    {
        m_instance = gameObject.GetComponent<LevelNoEnoughUIViewManager>();
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList = FindTransform("LevelNoEnoughUIGridList");
        m_gridListCamera = FindTransform("LevelNoEnoughUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_camInitPos = m_gridListCamera.transform.localPosition;

        m_dragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow = FindTransform("LevelNoEnoughUIArrowUp").gameObject;
        m_dragableCamera.RightArrow = FindTransform("LevelNoEnoughUIArrowDown").gameObject;

        m_goLevelNoEnoughUIProgressBar = FindTransform("LevelNoEnoughUIProgressBar").gameObject;
        m_lblLevelNoEnoughUIProgressBarCurLevel = FindTransform("LevelNoEnoughUIProgressBarCurLevel").GetComponentsInChildren<UILabel>(true)[0];
        m_lblLevelNoEnoughUIProgressBarNextLevel = FindTransform("LevelNoEnoughUIProgressBarNextLevel").GetComponentsInChildren<UILabel>(true)[0];
        m_lblLevelNoEnoughUITipText = FindTransform("LevelNoEnoughUITipText").GetComponentsInChildren<UILabel>(true)[0];

        FindTransform("LevelNoEnoughUIBtnClose").gameObject.AddComponent<LevelNoEnoughUIButton>();

        Initialize();    
    }
コード例 #26
0
    void Awake()
    {
        m_instance    = gameObject.GetComponent <LevelNoEnoughUIViewManager>();
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranUIGridlList = FindTransform("LevelNoEnoughUIGridList");
        m_gridListCamera  = FindTransform("LevelNoEnoughUIGridListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_camInitPos      = m_gridListCamera.transform.localPosition;

        m_dragableCamera            = m_gridListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow  = FindTransform("LevelNoEnoughUIArrowUp").gameObject;
        m_dragableCamera.RightArrow = FindTransform("LevelNoEnoughUIArrowDown").gameObject;

        m_goLevelNoEnoughUIProgressBar           = FindTransform("LevelNoEnoughUIProgressBar").gameObject;
        m_lblLevelNoEnoughUIProgressBarCurLevel  = FindTransform("LevelNoEnoughUIProgressBarCurLevel").GetComponentsInChildren <UILabel>(true)[0];
        m_lblLevelNoEnoughUIProgressBarNextLevel = FindTransform("LevelNoEnoughUIProgressBarNextLevel").GetComponentsInChildren <UILabel>(true)[0];
        m_lblLevelNoEnoughUITipText = FindTransform("LevelNoEnoughUITipText").GetComponentsInChildren <UILabel>(true)[0];

        FindTransform("LevelNoEnoughUIBtnClose").gameObject.AddComponent <LevelNoEnoughUIButton>();

        Initialize();
    }
コード例 #27
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranInstanceBossTreasureUIGridlList = m_myTransform.FindChild(m_widgetToFullName["InstanceBossTreasureUIGridList"]);
        m_gridListCamera = m_myTransform.FindChild(m_widgetToFullName["InstanceBossTreasureUIGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_camRewardItemListInitPos = m_gridListCamera.transform.localPosition;

        m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_gridListMyDragableCamera.LeftArrow = FindTransform("InstanceBossTreasureUIArrowL").gameObject;
        m_gridListMyDragableCamera.RightArrow = FindTransform("InstanceBossTreasureUIArrowR").gameObject;

        FindTransform("InstanceBossTreasureUIBtnOK").gameObject.AddComponent<InstanceBossTreasureUIButton>();

        m_gridListCameraFX = FindTransform("InstanceBossTreasureUIGridListCameraFX").GetComponentsInChildren<Camera>(true)[0];
        m_tranInstanceBossTreasureUIGridListFX = FindTransform("InstanceBossTreasureUIGridListFX");

        // Boss宝箱奖励UI
        m_goInstanceBossTreasureUIRewardUI = FindTransform("InstanceBossTreasureUIRewardUI").gameObject;
        m_goInstanceBossTreasureUIRewardUI.SetActive(false);
        m_listInstanceBossTreasureUIRewardUIInfo.Clear();
        m_listInstanceBossTreasureUIRewardUIInfoText.Clear();
        for (int i = 1; i <= MAX_REWARD_COUNT; i++)
        {
            GameObject goReward = FindTransform("InstanceBossTreasureUIRewardUIInfo" + i).gameObject;
            m_listInstanceBossTreasureUIRewardUIInfo.Add(goReward);
            m_listInstanceBossTreasureUIRewardUIInfoText.Add(goReward.GetComponentsInChildren<UILabel>(true)[0]);
        }

        // ChineseData
        FindTransform("InstanceBossTreasureUITitle").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46982);
        FindTransform("InstanceBossTreasureUITip").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46983);

        Initialize();
    }
コード例 #28
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_tranInstanceBossTreasureUIGridlList = m_myTransform.Find(m_widgetToFullName["InstanceBossTreasureUIGridList"]);
        m_gridListCamera           = m_myTransform.Find(m_widgetToFullName["InstanceBossTreasureUIGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_camRewardItemListInitPos = m_gridListCamera.transform.localPosition;

        m_gridListMyDragableCamera            = m_gridListCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_gridListMyDragableCamera.LeftArrow  = FindTransform("InstanceBossTreasureUIArrowL").gameObject;
        m_gridListMyDragableCamera.RightArrow = FindTransform("InstanceBossTreasureUIArrowR").gameObject;

        FindTransform("InstanceBossTreasureUIBtnOK").gameObject.AddComponent <InstanceBossTreasureUIButton>();

        m_gridListCameraFX = FindTransform("InstanceBossTreasureUIGridListCameraFX").GetComponentsInChildren <Camera>(true)[0];
        m_tranInstanceBossTreasureUIGridListFX = FindTransform("InstanceBossTreasureUIGridListFX");

        // Boss宝箱奖励UI
        m_goInstanceBossTreasureUIRewardUI = FindTransform("InstanceBossTreasureUIRewardUI").gameObject;
        m_goInstanceBossTreasureUIRewardUI.SetActive(false);
        m_listInstanceBossTreasureUIRewardUIInfo.Clear();
        m_listInstanceBossTreasureUIRewardUIInfoText.Clear();
        for (int i = 1; i <= MAX_REWARD_COUNT; i++)
        {
            GameObject goReward = FindTransform("InstanceBossTreasureUIRewardUIInfo" + i).gameObject;
            m_listInstanceBossTreasureUIRewardUIInfo.Add(goReward);
            m_listInstanceBossTreasureUIRewardUIInfoText.Add(goReward.GetComponentsInChildren <UILabel>(true)[0]);
        }

        // ChineseData
        FindTransform("InstanceBossTreasureUITitle").GetComponentsInChildren <UILabel>(true)[0].text = LanguageData.GetContent(46982);
        FindTransform("InstanceBossTreasureUITip").GetComponentsInChildren <UILabel>(true)[0].text   = LanguageData.GetContent(46983);

        Initialize();
    }
コード例 #29
0
    void Awake()
    {
        m_myTransform = transform;
        m_instance    = m_myTransform.GetComponentsInChildren <DoorOfBuryUIViewManager>(true)[0];
        FillFullNameData(m_myTransform);

        m_friendGridList         = FindTransform("DoorOfBuryChooseFriendList");
        m_friendGridDCam         = FindTransform("DoorOfBuryChooseFriendListCamera").GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_lblCountDownTime       = FindTransform("DoorOfBuryChooseCountDown").GetComponentsInChildren <UILabel>(true)[0];
        m_lblCountDownTime.color = SystemUIColorManager.RED;
        m_lblTitle = FindTransform("DoorOfBuryChooseTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_goGODoorOfBuryChooseHasGrid = FindTransform("GODoorOfBuryChooseHasGrid").gameObject;
        m_goGODoorOfBuryChooseNoGrid  = FindTransform("GODoorOfBuryChooseNoGrid").gameObject;

        Camera camera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_friendGridDCam.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera    = camera;
        FindTransform("TopRight").GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = camera;

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

        Initialize();
    }
コード例 #30
0
 private void OnListPageMove(UILabel lbl, MyDragableCamera camera, int count, int gap, float pageHeight)
 {
     Mogo.Util.LoggerHelper.Debug("OnListPageMove:" + lbl.name + ",count:" + count + ",gap:" + gap + ",pageHeight:" + pageHeight);
     lbl.text = GetPageNumStr(camera, GetPageNum(count, gap, pageHeight));
 }
コード例 #31
0
    private void InitTongListUIObj()
    {
        m_otherTong = GetUIChild("OtherTong");
        m_tongListCamera = GetUIChild("TongListCamera");
        m_tongListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("Camera").GetComponent<Camera>();
        m_tongListCameraBegin = GetUIChild("TongListPosBegin");
        tonglistPageHeight = GetUIChild("TongListBG").transform.localScale.y;
        m_tongListRoot = GetUIChild("TongList");
        m_tongListBtnList = m_tongListRoot.GetComponent<MogoSingleButtonList>();
        m_tongListPageNum = GetUIChild("TongListPageNum").GetComponent<UILabel>();
        m_tongListDragCamera = m_tongListCamera.GetComponent<MyDragableCamera>();
        m_tongListDragCamera.MovePageDone +=
            (() =>
            {
                OnListPageMove(m_tongListPageNum, m_tongListDragCamera, m_tongDataList.Count, TONG_LIST_GRID_GAP, tonglistPageHeight);
            });
        m_createTong = GetUIChild("CreateTong");
        m_createTongCostLbl = GetUIChild("CreateTongCostNumLbl").GetComponent<UILabel>();
        m_createTongInputName = GetUIChild("CreateTongInputlbl").GetComponent<UILabel>();

        //test data
        //m_tongDataList = new List<TongData>();
        //for (int i = 0; i < 21; i++)
        //{
        //    TongData tong = new TongData() { level = i + "", name = "name" + i, num = (i + 1) + "" };
        //    m_tongDataList.Add(tong);
        //}
    }
コード例 #32
0
    /// <summary>
    /// 把背包滑动到目标页
    /// </summary>
    public void MoveToPackagePage(int page = 0, bool bSetCurrentPage = false)
    {
        if (m_packageDragableCamera == null)
            m_packageDragableCamera = m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<MyDragableCamera>(true)[0];

        m_packageDragableCamera.MoveTo(page);
          if (bSetCurrentPage)
            m_packageDragableCamera.IsSetCurrentPageByChangeTab = true;
    }
コード例 #33
0
 private string GetPageNumStr(MyDragableCamera camera, int pageNum)
 {
     //Mogo.Util.LoggerHelper.Debug("camera:" + camera.gameObject.name);
     //Mogo.Util.LoggerHelper.Debug("camera.GetCurrentPage():" + camera.GetCurrentPage() + ",pageNum:" + pageNum);
     int currentPage = camera.GetCurrentPage() + 1;
     if (currentPage > pageNum) currentPage = pageNum;
     return currentPage + "/" + pageNum;
 }
コード例 #34
0
ファイル: MyDragCamera.cs プロジェクト: lbddk/ahzs-client
 // 初始化
 void Start()
 {
     m_myDCamera = RelatedCamera.GetComponentInChildren<MyDragableCamera>() as MyDragableCamera;
 }
コード例 #35
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_transPackageItemList     = m_myTransform.Find(m_widgetToFullName["InsetDialogPackageItemList"]);
        m_transInsetDialogIconList = m_myTransform.Find(m_widgetToFullName["InsetDialogIconList"]);
        m_transInsetHoleList       = m_myTransform.Find(m_widgetToFullName["InsetDialogBody"]);

        m_dragCamera = FindTransform("InsetDialogPackageItemListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_dragIconCamera = FindTransform("InsetDialogIconListCamera").GetComponentsInChildren <Camera>(true)[0];
        m_dragIconCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0];
        m_dragIconCamera.GetComponentsInChildren <UIViewport>(true)[0].topLeft      = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragIconCamera.GetComponentsInChildren <UIViewport>(true)[0].bottomRight  = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableIconCamera            = m_dragIconCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableIconCamera.LeftArrow  = FindTransform("InsetDialogIconListArrowU").gameObject;
        m_dragableIconCamera.RightArrow = FindTransform("InsetDialogIconListArrowD").gameObject;

        m_ssInsetEquipmentIcon = m_myTransform.Find(m_widgetToFullName["InsetDialogEquipFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        m_ssInsetEquipmentIconBG  = m_myTransform.Find(m_widgetToFullName["InsetDialogEquipBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_goPackageArea           = m_myTransform.Find(m_widgetToFullName["InsetDialogPackageListPos"]).gameObject;
        m_goInsetDialogDiamondTip = m_myTransform.Find(m_widgetToFullName["DiamondInfoTip"]).gameObject;

        m_lblDiamondTipDesc  = m_myTransform.Find(m_widgetToFullName["DiamondInfoDetailEffectNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblDiamondTipLevel = m_myTransform.Find(m_widgetToFullName["DiamondInfoDetailLevelNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblDiamondTipName  = m_myTransform.Find(m_widgetToFullName["DiamondInfoNameText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblDiamondTipType  = m_myTransform.Find(m_widgetToFullName["DiamondInfoDetailTypeNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_ssDiamondTipIcon   = m_myTransform.Find(m_widgetToFullName["DiamondInfoDetailImageFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_ssDiamondTipIconBG = m_myTransform.Find(m_widgetToFullName["DiamondInfoDetailImageBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        m_jewelHoleObj = m_myTransform.Find(m_widgetToFullName["InsetDialogHole"]).gameObject;
        m_jewelHole1   = m_myTransform.Find(m_widgetToFullName["InsetDialogHole0"]).gameObject;
        m_jewelHole2   = m_myTransform.Find(m_widgetToFullName["InsetDialogHole1"]).gameObject;
        m_jewelHole3   = m_myTransform.Find(m_widgetToFullName["InsetDialogHole2"]).gameObject;
        m_jewelHole4   = m_myTransform.Find(m_widgetToFullName["InsetDialogHole3"]).gameObject;

        m_myTransform.Find(m_widgetToFullName["InsetDialog1BGMask"]).gameObject.AddComponent <InsetBGMask>();
        m_jewelHoleList = new List <GameObject>();
        m_jewelHoleList.Add(m_jewelHole1);
        m_jewelHoleList.Add(m_jewelHole2);
        m_jewelHoleList.Add(m_jewelHole3);
        m_jewelHoleList.Add(m_jewelHole4);
        m_jewleHoleOriginalPos = m_myTransform.Find(m_widgetToFullName["InsetDialogHolePos"]).localPosition;

        m_dialog1            = m_myTransform.Find(m_widgetToFullName["InsetDialog1"]).gameObject;
        m_dialog2            = m_myTransform.Find(m_widgetToFullName["InsetDialog2"]).gameObject;
        m_dialog2InfoDetail  = m_myTransform.Find(m_widgetToFullName["InsetDialog2Info"]).gameObject;
        m_dialog2Title       = m_myTransform.Find(m_widgetToFullName["InsetDialog2TopTitle"]).GetComponentsInChildren <UILabel>(true)[0];;
        m_dialog2EquipIconFg = m_myTransform.Find(m_widgetToFullName["InsetDialog2IconFg"]).GetComponentsInChildren <UISprite>(true)[0];
        m_dialog2EquipIconBg = m_myTransform.Find(m_widgetToFullName["InsetDialog2IconBg"]).GetComponentsInChildren <UISprite>(true)[0];
        m_dialog2EquipName   = m_myTransform.Find(m_widgetToFullName["InsetDialog2EquipName"]).GetComponentsInChildren <UILabel>(true)[0];
        m_dialog2LevelNeed   = m_myTransform.Find(m_widgetToFullName["InsetDialog2NeedLevel"]).GetComponentsInChildren <UILabel>(true)[0];

        m_lblJewelListDesc = m_myTransform.Find(m_widgetToFullName["InsetDialogPackageText"]).GetComponentsInChildren <UILabel>(true)[0];

        m_texInsetSucessSign   = m_myTransform.Find(m_widgetToFullName["InsetUISucessSign"]).GetComponentsInChildren <UITexture>(true)[0];
        m_texComposeSucessSign = m_myTransform.Find(m_widgetToFullName["InsetUIComposeSucessSign"]).GetComponentsInChildren <UITexture>(true)[0];

        m_myTransform.Find(m_widgetToFullName["InsetDialog1Buy"]).gameObject.AddComponent <MogoUIListener>().MogoOnClick =
            () =>
        {
            EventDispatcher.TriggerEvent(InsetManager.ON_BUY);
        };

        for (int i = 0; i < 4; ++i)
        {
            m_arrInsetHoleIcon[i]       = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "FG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
            m_arrInsetHoleUnloadSign[i] = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "Unload"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
            m_arrInsetHoleUpSign[i]     = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "Update"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
            m_arrInsetHoleTooltip[i]    = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "ToolTip"]).gameObject;
            m_arrInsetHoleBGDown[i]     = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "BG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
            m_arrInsetHoleBGUp[i]       = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "BGUp"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
            m_arrInsetHoleTypeName[i]   = m_myTransform.Find(m_widgetToFullName["InsetDialogHole" + i + "TypeName"]).GetComponentsInChildren <UILabel>(true)[0];
        }

        for (int i = 0; i < 6; ++i)
        {
            m_gotransformList.Add(m_myTransform.Find(m_widgetToFullName["transformList" + i]).gameObject);
        }

        for (int i = 0; i < 6; i++)
        {
            if (i > 0)
            {
                m_gotransformList[i].transform.localPosition = new Vector3(
                    m_gotransformList[0].transform.localPosition.x + PACKAGEITEMNUMONEPAGE * PACKAGEITEMSPACE * i,
                    m_gotransformList[i].transform.localPosition.y,
                    m_gotransformList[i].transform.localPosition.z);
            }
        }

        bool m_bIsAllLoaded = false;

        for (int i = 0; i < ICONGRIDNUM; ++i)
        {
            int index = i;

            AssetCacheMgr.GetUIInstance("StrenthenDialogIconGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj              = (GameObject)go;
                obj.transform.parent        = m_transInsetDialogIconList;
                obj.transform.localPosition = new Vector3(0, ICONGRIDSPACE * index, 0);
                obj.transform.localScale    = new Vector3(0.0008f, 0.0008f, 1);
                obj.GetComponentsInChildren <MyDragCamera>(true)[0].RelatedCamera     = m_dragIconCamera;
                obj.GetComponentsInChildren <MyDragCamera>(true)[0].m_goDraggableArea = m_goPackageArea;
                obj.name = "InsetIconListIcon" + index.ToString();
                var s    = m_transInsetDialogIconList.GetComponentsInChildren <MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
                s.SingleButtonList.Add(obj.GetComponentsInChildren <MogoSingleButton>(true)[0]);
                obj.AddComponent <InsetUIEquipmentGrid>().id = index;

                m_listEquipmentGrid.Add(obj);

                if (m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    // 滑动形式需要处理(翻页不需要设置)
                    if (!m_dragableIconCamera.IsMovePage)
                    {
                        m_dragableIconCamera.FPageHeight = ICONGRIDSPACE * ICON_GRID_ONE_PAGE;
                        m_dragableIconCamera.MAXY        = ICON_OFFSET_Y;
                        if (m_listEquipmentGrid.Count > ICON_GRID_ONE_PAGE)
                        {
                            m_dragableIconCamera.MINY = (m_listEquipmentGrid.Count - ICON_GRID_ONE_PAGE) * ICONGRIDSPACE + ICON_OFFSET_Y;
                        }
                        else
                        {
                            m_dragableIconCamera.MINY = m_dragableIconCamera.MAXY;
                        }
                    }
                }

                if (!m_bIsAllLoaded && m_listPackageGrid.Count == PACKAGEITEMNUM && m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EventDispatcher.TriggerEvent(InsetManager.ON_INSET_SHOW);

                    if (MogoUIManager.Instance.InsetUILoaded != null)
                    {
                        MogoUIManager.Instance.InsetUILoaded();
                        MogoUIManager.Instance.InsetUILoaded = null;
                    }

                    m_bIsAllLoaded = true;
                }

                if (index == 0)
                {
                    InsetTabDown(index);
                }
                else
                {
                    InsetTabUp(index);
                }
            });
        }

        for (int i = 0; i < PACKAGEITEMNUM; ++i)
        {
            int index = i;
            AssetCacheMgr.GetUIInstance("InsetDialogPackageGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj              = (GameObject)go;
                obj.name                    = "InsetDialogPackageGrid" + index;
                obj.transform.parent        = m_transPackageItemList;
                obj.transform.localPosition = new Vector3(PACKAGEITEMSPACE * index - 0.012f, 0, 0);
                obj.transform.localScale    = new Vector3(0.0008f, 0.0008f, 1);
                m_listItemFG.Add(obj.transform.GetComponentsInChildren <UISlicedSprite>(true)[1]);
                m_listItemNum.Add(obj.transform.GetComponentsInChildren <UILabel>(true)[0]);
                m_listItemBG.Add(obj.transform.GetComponentsInChildren <UISlicedSprite>(true)[0]);
                obj.GetComponentsInChildren <MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;

                obj.AddComponent <InsetUIPackageGrid>().ID = index;

                m_listPackageGrid.Add(obj);

                if (!m_bIsAllLoaded && m_listPackageGrid.Count == PACKAGEITEMNUM && m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EventDispatcher.TriggerEvent(InsetManager.ON_INSET_SHOW);

                    if (MogoUIManager.Instance.InsetUILoaded != null)
                    {
                        //Debug.LogError("InsetUILoaded != null");
                        MogoUIManager.Instance.InsetUILoaded();
                        MogoUIManager.Instance.InsetUILoaded = null;
                    }
                    //else
                    //{
                    //    Debug.LogError("InsetUILoaded == null");
                    //}

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

        Initialize();

        m_transStrenthenDialogIconList = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogIconList"]);

        m_dragCamera = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogIconListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].topLeft = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].bottomRight = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableCamera = m_dragCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow = FindTransform("StrenthenDialogIconListArrowU").gameObject;
        m_dragableCamera.RightArrow = FindTransform("StrenthenDialogIconListArrowD").gameObject;

        m_bcStrenthUIBoxCollider = FindTransform("StrenthUIBoxCollider").GetComponentsInChildren<BoxCollider>(true)[0];

        //m_goStrenthenDialogStarRewardStarLevel = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogStarRewardStarLevel"]).gameObject;
        //m_goStarLevelListPosBegin = m_myTransform.FindChild(m_widgetToFullName["StarLevelListPosBegin"]).gameObject;
        //m_StrenthenStarLevelInfo = m_goStrenthenDialogStarRewardStarLevel.AddComponent<StrenthenStarLevelInfo>();
        //if (m_StrenthenStarLevelInfo != null)
        //    m_StrenthenStarLevelInfo.CreateStarLevelInfo(m_goStrenthenDialogStarRewardStarLevel.transform, m_goStarLevelListPosBegin.transform.localPosition);

        m_lblBaseEquipType = m_myTransform.FindChild(m_widgetToFullName["BaseAttributeEquipTypeText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblStarLevel = m_myTransform.FindChild(m_widgetToFullName["StarLevelText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseAttribute = m_myTransform.FindChild(m_widgetToFullName["BaseAttributeText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblAfterAttribute = m_myTransform.FindChild(m_widgetToFullName["AfterAttributeText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblEquipmentLevel = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];

        for (int i = 0; i < 10; i++)
        {
            m_arrStrenthLevelBG[i] = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogLevelBG" + i]).gameObject;
            m_arrStrenthLevelBG[i].transform.localPosition = new Vector3(
                m_arrStrenthLevelBG[0].transform.localPosition.x + 53 * i,
                m_arrStrenthLevelBG[i].transform.localPosition.y,
                m_arrStrenthLevelBG[i].transform.localPosition.z);

            UIFilledSprite fs = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogLevelFG" + i]).GetComponentsInChildren<UIFilledSprite>(true)[0];
            m_fsEquipmentExpList[i] = fs;
            m_fsEquipmentExpList[i].transform.localPosition = new Vector3(
               m_fsEquipmentExpList[0].transform.localPosition.x + 53 * i,
               m_fsEquipmentExpList[i].transform.localPosition.y,
               m_fsEquipmentExpList[i].transform.localPosition.z);
        }
        m_ssEquipmentImage = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogImgFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];

        m_lblBaseReward0Title = FindTransform("LevelReward0BaseTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward1Title = FindTransform("LevelReward1BaseTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward2Title = FindTransform("LevelReward2BaseTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward0Num = FindTransform("LevelReward0BaseNum").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward1Num = FindTransform("LevelReward1BaseNum").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward2Num = FindTransform("LevelReward2BaseNum").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward0TextAnimation = FindTransform("LevelReward0BaseTextAnimation").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward1TextAnimation = FindTransform("LevelReward1BaseTextAnimation").GetComponentsInChildren<UILabel>(true)[0];
        m_lblBaseReward2TextAnimation = FindTransform("LevelReward2BaseTextAnimation").GetComponentsInChildren<UILabel>(true)[0];

        m_goLevelRewardAfter = FindTransform("GOLevelRewardAfter").gameObject;
        m_lblAfterReward0 = m_myTransform.FindChild(m_widgetToFullName["LevelReward0AfterText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblAfterReward1 = m_myTransform.FindChild(m_widgetToFullName["LevelReward1AfterText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblAfterReward2 = m_myTransform.FindChild(m_widgetToFullName["LevelReward2AfterText"]).GetComponentsInChildren<UILabel>(true)[0];

          // 强化按钮
        m_goStrenthenDialogStrenth = FindTransform("StrenthenDialogStrenth").gameObject;
        m_spStrenthenDialogStrenthBGUp = FindTransform("StrenthenDialogStrenthBGUp").GetComponentsInChildren<UISprite>(true)[0];

        m_lblNeedGold = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogCostGold"]).GetComponentsInChildren<UILabel>(true)[0];       
        m_lblCurrentGold = m_myTransform.FindChild(m_widgetToFullName["StrenthUICrrentGoldNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblNeedLevel = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogNeedLevelText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblCost = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogCostText"]).GetComponentsInChildren<UILabel>(true)[0];

        // 强化需要的材料
        m_lblNeedMaterial1 = FindTransform("StrenthenDialogCostMaterial1").GetComponentsInChildren<UILabel>(true)[0];
        m_lblNeedMaterial2 = FindTransform("StrenthenDialogCostMaterial2").GetComponentsInChildren<UILabel>(true)[0];
        m_spNeedMaterialIcon1 = FindTransform("StrenthenDialogCostMaterial1Icon").GetComponentsInChildren<UISprite>(true)[0];
        m_spNeedMaterialIcon2 = FindTransform("StrenthenDialogCostMaterial2Icon").GetComponentsInChildren<UISprite>(true)[0];
        m_goNeedMaterial2 = FindTransform("GOStrenthenDialogCostMaterial2").gameObject;

        // 强化需要的材料不足,显示的指引按钮
        m_goGOMaterialObtainTip = m_myTransform.FindChild(m_widgetToFullName["GOMaterialObtainTip"]).gameObject;
        m_goStrenthenDialogMaterialTip = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogMaterialTip"]).gameObject;
        m_spStrenthenDialogMaterialTipBGUp = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogMaterialTipBGUp"]).GetComponentsInChildren<UISprite>(true)[0];
        m_spStrenthenDialogMaterialTipBGDown = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogMaterialTipBGDown"]).GetComponentsInChildren<UISprite>(true)[0];

        for (int i = 0; i < ICONGRIDNUM; ++i)
        {
            //obj = (GameObject)Instantiate(Resources.Load("GUI/StrenthenDialogIconGrid"));
            //obj.transform.parent = m_transStrenthenDialogIconList ;
            //obj.transform.localPosition = new Vector3(0,-ICONGRIDSPACE * i, 0);
            //obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 0.0008f);
            //obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;
            //obj.name = "EquipmentGrid"+i.ToString();
            //var s = m_transStrenthenDialogIconList.GetComponentsInChildren<MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
            //s.SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);
            //obj.AddComponent<StrenthenEquipmentGrid>().id = i;
            //m_listEquipmentGrid.Add(obj);

            int index = i;
            AssetCacheMgr.GetUIInstance("StrenthenDialogIconGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj = (GameObject)go;
                obj.transform.parent = m_transStrenthenDialogIconList;
                obj.transform.localPosition = new Vector3(0, ICONGRIDSPACE * index, 0);
                obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 1);
                obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;
                obj.name = "EquipmentGrid" + index.ToString();
                var s = m_transStrenthenDialogIconList.GetComponentsInChildren<MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
                s.SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);
                obj.AddComponent<StrenthenEquipmentGrid>().id = index;

                Transform tranStarLevel = obj.transform.FindChild("StrenthenDialogIconGridStarLevelList");
                StrenthenStarLevelInfo strenthenStarLevelInfo = tranStarLevel.gameObject.AddComponent<StrenthenStarLevelInfo>();
                if (strenthenStarLevelInfo != null)
                    strenthenStarLevelInfo.CreateStarLevelInfo(tranStarLevel, new Vector3(0, 0, 0));

                m_listEquipmentGrid.Add(obj);

                ShowEquipmentUpSign(index, false);

                if (m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EquipmentUIViewManager.Instance.IsCanClick = true;
                    EventDispatcher.TriggerEvent(BodyEnhanceManager.ON_SHOW);

                    if (MogoUIManager.Instance.StrenthUILoaded != null)
                    {
                        MogoUIManager.Instance.StrenthUILoaded();
                    }

                    // 滑动形式需要处理(翻页不需要设置)
                    if (!m_dragableCamera.IsMovePage)
                    {
                        m_dragableCamera.FPageHeight = ICONGRIDSPACE * ICON_GRID_ONE_PAGE;
                        m_dragableCamera.MAXY = ICON_OFFSET_Y;
                        if (m_listEquipmentGrid.Count > ICON_GRID_ONE_PAGE)
                            m_dragableCamera.MINY = (m_listEquipmentGrid.Count - ICON_GRID_ONE_PAGE) * ICONGRIDSPACE + ICON_OFFSET_Y;
                        else
                            m_dragableCamera.MINY = m_dragableCamera.MAXY;
                    }                 

                    MogoGlobleUIManager.Instance.ShowWaitingTip(false);
                }

                if (index == 0)
                    StrenthTabDown(index);
                else
                    StrenthTabUp(index);
            });
        }
    }
コード例 #37
0
    /// <summary>
    /// 获取背包当前页
    /// </summary>
    /// <returns></returns>
    public int GetCurrentPage()
    {
        if (m_packageDragableCamera == null)
            m_packageDragableCamera = m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<MyDragableCamera>(true)[0];

        return m_packageDragableCamera.GetCurrentPage();
    }
コード例 #38
0
    void Awake()
    {
        Instance = GetComponentsInChildren <EquipTipManager>(true)[0];

        FillFullNameData(transform);

        m_equipTip             = transform.FindChild(m_widgetToFullName["EquipTip"]).gameObject;
        m_equipTipDetail       = transform.FindChild(m_widgetToFullName["EquipTipDetail3"]).gameObject;
        m_equipDetailName      = transform.FindChild(m_widgetToFullName["EquipTipNameText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailNeedLevel = transform.FindChild(m_widgetToFullName["EquipTipDetailNeedLevelNum"]).GetComponentsInChildren <UILabel>(true)[0];
        //m_equipDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["EquipTipDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailNeedJob   = transform.FindChild(m_widgetToFullName["EquipTipDetailNeedJobText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailExtra     = transform.FindChild(m_widgetToFullName["EquipTipDetailExtraText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailImageFG   = transform.FindChild(m_widgetToFullName["EquipTipDetailImageFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_equipDetailImageBG   = transform.FindChild(m_widgetToFullName["EquipTipDetailImageBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_equipDetailImageUsed = transform.FindChild(m_widgetToFullName["EquipTipDetailImageUsed"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_equipTipCamera       = transform.FindChild(m_widgetToFullName["EquipTipDetailCamera"]).GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_equipTipCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_equipTipCameraPosBegin  = transform.FindChild(m_widgetToFullName["EquipTipDetailBegin"]);
        m_equipTipCameraArea      = transform.FindChild(m_widgetToFullName["EquipTipDetailInfoBG"]);
        m_equipDetailNeedLevellbl = transform.FindChild(m_widgetToFullName["EquipTipDetailNeedLevelText"]).GetComponentsInChildren <UILabel>(true)[0];


        m_equipTipCurrent = transform.FindChild(m_widgetToFullName["EquipTipCurrent"]).gameObject;
        m_equipDetailNeedLevellblCurrent = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailNeedLevelText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipTipDetailCurrent          = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetail3"]).gameObject;
        m_equipDetailNameCurrent         = transform.FindChild(m_widgetToFullName["EquipTipCurrentNameText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailNeedLevelCurrent    = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailNeedLevelNum"]).GetComponentsInChildren <UILabel>(true)[0];
        //m_equipDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["EquipTipDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailNeedJobCurrent   = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailNeedJobText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailExtraCurrent     = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailExtraText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_equipDetailImageFGCurrent   = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailImageFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_equipDetailImageBGCurrent   = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailImageBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];
        m_equipDetailImageUsedCurrent = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailImageUsed"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        m_equipTipCameraCurrent = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailCamera"]).GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_equipTipCameraCurrent.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_equipTipCameraPosBeginCurrent = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailBegin"]);
        m_equipTipCameraAreaCurrent     = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailInfoBG"]);

        center = transform.FindChild(m_widgetToFullName["Center"]);
        right  = transform.FindChild(m_widgetToFullName["Right"]);


        //if (m_equipTipCurrent == null) Mogo.Util.LoggerHelper.Debug("f**k!");


        transform.FindChild(m_widgetToFullName["EquipTipClose"]).gameObject.AddComponent <EquipTipClose>();

        m_goGOEquipTipDetailScore          = transform.FindChild(m_widgetToFullName["GOEquipTipDetailScore"]).gameObject;
        m_lblEquipTipDetailScoreNum        = transform.FindChild(m_widgetToFullName["EquipTipDetailScoreNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_goGOEquipTipCurrentDetailScore   = transform.FindChild(m_widgetToFullName["GOEquipTipCurrentDetailScore"]).gameObject;
        m_lblEquipTipCurrentDetailScoreNum = transform.FindChild(m_widgetToFullName["EquipTipCurrentDetailScoreNum"]).GetComponentsInChildren <UILabel>(true)[0];


        //预加载
        InitPrefabDic();

        this.gameObject.SetActive(false);
        m_equipTipCurrent.SetActive(false);
    }
コード例 #39
0
    void Awake()
	{
        m_instance = this;
		m_myTransform = transform;
		FillFullNameData(m_myTransform);

        m_lblInstanceLevelChooseUIItemRewardUITitle = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIItemRewardUITitle"]).GetComponent<UILabel>();
        m_lblInstanceLevelChooseUICardRewardUITitle = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUICardRewardUITitle"]).GetComponent<UILabel>();

        m_lblMissionFoggyAbyssTip = FindTransform("InstanceLevelChooseUIMissionFoggyAbyssTip").GetComponentsInChildren<UILabel>(true)[0];
		m_lblInstanceLevelChooseUICostVP = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUICostVP"]).GetComponent<UILabel>();        
        m_lblInstanceLevelChooseUIReqLevel = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIReqLevel"]).GetComponent<UILabel>();
        m_goGOInstanceLevelChooseUIDrop = m_myTransform.FindChild(m_widgetToFullName["GOInstanceLevelChooseUIDrop"]).gameObject;
		m_lblInstanceLevelChooseUIDrop = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIDrop"]).GetComponent<UILabel>();		

		m_goInstanceLevelChooseUIBtnBack = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIBtnBack"]).gameObject;		
		m_goInstanceLevelChooseUIBtnClose = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIBtnClose"]).gameObject;		
		m_goInstanceLevelChooseUIBtnHelp = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIBtnHelp"]).gameObject;
        m_goInstanceLevelChooseUIBtnMissionFlag = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIBtnRW"]).gameObject;        

        // 评价星级
		m_texInstanceLevelChooseUIStarType = FindTransform("InstanceLevelChooseUIStarType").GetComponent<UITexture>();
        m_texInstanceLevelChooseUIStarTypeBG = FindTransform("InstanceLevelChooseUIStarTypeBG").GetComponent<UITexture>();

        // 扫荡按钮
        m_goInstanceLevelChooseUIBtnClean = FindTransform("InstanceLevelChooseUIBtnClean").gameObject;
        m_lblInstanceLevelChooseUIBtnClean = FindTransform("InstanceLevelChooseUIBtnCleanText").GetComponent<UILabel>();
		m_spInstanceLevelChooseUIBtnCleanBGDown = FindTransform("InstanceLevelChooseUIBtnCleanBGDown").GetComponent<UISprite>();
		m_spInstanceLevelChooseUIBtnCleanBGUp = FindTransform("InstanceLevelChooseUIBtnCleanBGUp").GetComponent<UISprite>();

        // 进入按钮
        m_goInstanceLevelChooseUIBtnEnter = FindTransform("InstanceLevelChooseUIBtnEnter").gameObject;
        m_lblInstanceLevelChooseUIBtnEnter = FindTransform("InstanceLevelChooseUIBtnEnterText").GetComponent<UILabel>();
		m_spInstanceLevelChooseUIBtnEnterBGDown = FindTransform("InstanceLevelChooseUIBtnEnterBGDown").GetComponent<UISprite>();
		m_spInstanceLevelChooseUIBtnEnterBGUp = FindTransform("InstanceLevelChooseUIBtnEnterBGUp").GetComponent<UISprite>();
        m_goInstanceLevelChooseUIBtnEnterPosCenter = FindTransform("InstanceLevelChooseUIBtnEnterPosCenter").gameObject;
        m_goInstanceLevelChooseUIBtnEnterPosRight = FindTransform("InstanceLevelChooseUIBtnEnterPosRight").gameObject;

        //////////////////////////////////////////////////////////////////////////公共UI

        // 难度选择
        m_goInstanceLevelChooseLevel = FindTransform("InstanceLevelChooseLevel").gameObject;
		for (int i = 0; i < 2; ++i)
		{
			m_arrInstanceLevel[i] = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseLevel" + i]).gameObject;
			NewInstanceLevelGrid grid = m_arrInstanceLevel[i].AddComponent<NewInstanceLevelGrid>();
			grid.id = i;
			grid.parentNameFlag = "InstanceLevelChooseLevel";
			grid.MyStart();
		}

        // 当前提示(当前任务,掉落副本)
        m_goInstanceLevelChooseLevel0Tip = FindTransform("InstanceLevelChooseLevel0Tip").gameObject;
        m_goInstanceLevelChooseLevel1Tip = FindTransform("InstanceLevelChooseLevel1Tip").gameObject;
        m_lblInstanceLevelChooseLevel0TipText = FindTransform("InstanceLevelChooseLevel0TipText").GetComponentsInChildren<UILabel>(true)[0];
        m_lblInstanceLevelChooseLevel1TipText = FindTransform("InstanceLevelChooseLevel1TipText").GetComponentsInChildren<UILabel>(true)[0];

        //////////////////////////////////////////////////////////////////////////物品奖励UI
        m_goGOInstanceLevelChooseUIItemRewardUI = FindTransform("GOInstanceLevelChooseUIItemRewardUI").gameObject;

        // 物品奖励        
        m_tranInstanceLevelChooseUIDragRewardList = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIDragRewardList"]);
        m_dragRewardListCamera = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIDragRewardListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_dragRewardListCameraInitPos = m_dragRewardListCamera.transform.localPosition;
        m_dragRewardListMyDragableCamera = m_dragRewardListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragRewardListMyDragableCamera.LeftArrow = FindTransform("InstanceLevelChooseUIArrowL").gameObject;
        m_dragRewardListMyDragableCamera.RightArrow = FindTransform("InstanceLevelChooseUIArrowR").gameObject;
        m_goInstanceLevelPosItem1 = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelPosItem1"]).gameObject;
        m_goInstanceLevelPosItem2 = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelPosItem2"]).gameObject;
        m_goInstanceLevelPosItem3 = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelPosItem3"]).gameObject;
        m_goInstanceLevelPosItem4 = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelPosItem4"]).gameObject;
        m_tranGOInstanceLevelChooseUIDragRewardListSet = m_myTransform.FindChild(m_widgetToFullName["GOInstanceLevelChooseUIDragRewardListSet"]);

        // 玩家NO.1
        m_goGOInstanceLevelChooseUIPlayerNO1 = m_myTransform.FindChild(m_widgetToFullName["GOInstanceLevelChooseUIPlayerNO1"]).gameObject;
        m_lblInstanceLevelChooseUIPlayerNO1Title = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIPlayerNO1Title"]).GetComponent<UILabel>();
        m_lblInstanceLevelChooseUIPlayerNO1Name = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIPlayerNO1Name"]).GetComponent<UILabel>();
        m_lblInstanceLevelChooseUIPlayerNO1Score = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIPlayerNO1Score"]).GetComponent<UILabel>();
        m_lblInstanceLevelChooseUIPlayerNO1Vocation = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIPlayerNO1Vocation"]).GetComponent<UILabel>();


        //////////////////////////////////////////////////////////////////////////翻牌奖励UI
        m_goGOInstanceLevelChooseUICardRewardUI = FindTransform("GOInstanceLevelChooseUICardRewardUI").gameObject;       

         // 翻牌奖励可拖动显示
        m_tranInstanceLevelChooseUICardRewardList = FindTransform("InstanceLevelChooseUICardRewardList");
        m_dragCardRewardListCamera = FindTransform("InstanceLevelChooseUICardRewardListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_dragCardRewardListDragableCamera = m_dragCardRewardListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragCardRewardListDragableCamera.LeftArrow = FindTransform("InstanceLevelChooseUICardRewardArrowL").gameObject;
        m_dragCardRewardListDragableCamera.RightArrow = FindTransform("InstanceLevelChooseUICardRewardArrowR").gameObject;
        m_dragCardRewardListCameraInitPos = m_dragCardRewardListDragableCamera.transform.localPosition;

        m_spInstanceLevelChooseUIBGFG1 = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIBGFG1"]).GetComponentsInChildren<UISprite>(true)[0];
        m_goInstanceLevelChooseUIDropLevel0BG = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIDropLevel0BG"]).gameObject;
        m_goInstanceLevelChooseUIDropLevel1BG = m_myTransform.FindChild(m_widgetToFullName["InstanceLevelChooseUIDropLevel1BG"]).gameObject;

        //////////////////////////////////////////////////////////////////////////重置窗口
        m_goInstanceLevelChooseResetMissionWindow = FindTransform("NInstanceLevelChooseResetMissionWindow").gameObject;
		m_goInstanceLevelChooseResetMissionWindow.SetActive(false);
        m_goInstanceLevelChooseCanNotResetMissionWindow = FindTransform("NInstanceLevelChooseCanNotResetMissionWindow").gameObject;
        m_goInstanceLevelChooseCanResetMissionWindow = FindTransform("NInstanceLevelChooseCanResetMissionWindow").gameObject;
        m_lblNInstanceLevelChooseCanNotResetMissionWindowText = FindTransform("NInstanceLevelChooseCanNotResetMissionWindowText").GetComponent<UILabel>();
        m_lblNInstanceLevelChooseCanResetMissionWindowInfo1Text = FindTransform("NInstanceLevelChooseCanResetMissionWindowInfo1Text").GetComponent<UILabel>();
        m_lblNInstanceLevelChooseCanResetMissionWindowTextNum = FindTransform("NInstanceLevelChooseCanResetMissionWindowTextNum").GetComponent<UILabel>();
        m_lblNInstanceLevelChooseCanResetMissionWindowTipNum = FindTransform("NInstanceLevelChooseCanResetMissionWindowTipNum").GetComponent<UILabel>();
        m_goGONInstanceLevelChooseCanResetMissionWindowInfo1 = FindTransform("GONInstanceLevelChooseCanResetMissionWindowInfo1").gameObject;
        m_goGONInstanceLevelChooseCanResetMissionWindowInfo2 = FindTransform("GONInstanceLevelChooseCanResetMissionWindowInfo2").gameObject;

        I18N();
		Initialize();
	}     
コード例 #40
0
 // 初始化
 void Start()
 {
     m_myDCamera = RelatedCamera.GetComponentInChildren <MyDragableCamera>() as MyDragableCamera;
 }
コード例 #41
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_transPackageItemList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageItemList"]);
        m_transInsetDialogIconList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogIconList"]);
        m_transInsetHoleList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogBody"]);

        m_dragCamera = FindTransform("InsetDialogPackageItemListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];

        m_dragIconCamera = FindTransform("InsetDialogIconListCamera").GetComponentsInChildren<Camera>(true)[0];
        m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].topLeft = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].bottomRight = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableIconCamera = m_dragIconCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableIconCamera.LeftArrow = FindTransform("InsetDialogIconListArrowU").gameObject;
        m_dragableIconCamera.RightArrow = FindTransform("InsetDialogIconListArrowD").gameObject;

        m_ssInsetEquipmentIcon = m_myTransform.FindChild(m_widgetToFullName["InsetDialogEquipFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];

        m_ssInsetEquipmentIconBG = m_myTransform.FindChild(m_widgetToFullName["InsetDialogEquipBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_goPackageArea = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageListPos"]).gameObject;
        m_goInsetDialogDiamondTip = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoTip"]).gameObject;

        m_lblDiamondTipDesc = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblDiamondTipLevel = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblDiamondTipName = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblDiamondTipType = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailTypeNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_ssDiamondTipIcon = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_ssDiamondTipIconBG = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];

        m_jewelHoleObj = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole"]).gameObject;
        m_jewelHole1 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole0"]).gameObject;
        m_jewelHole2 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole1"]).gameObject;
        m_jewelHole3 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole2"]).gameObject;
        m_jewelHole4 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole3"]).gameObject;

        m_myTransform.FindChild(m_widgetToFullName["InsetDialog1BGMask"]).gameObject.AddComponent<InsetBGMask>();
        m_jewelHoleList = new List<GameObject>();
        m_jewelHoleList.Add(m_jewelHole1);
        m_jewelHoleList.Add(m_jewelHole2);
        m_jewelHoleList.Add(m_jewelHole3);
        m_jewelHoleList.Add(m_jewelHole4);
        m_jewleHoleOriginalPos = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHolePos"]).localPosition;

        m_dialog1 = m_myTransform.FindChild(m_widgetToFullName["InsetDialog1"]).gameObject;
        m_dialog2 = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2"]).gameObject;
        m_dialog2InfoDetail = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2Info"]).gameObject;
        m_dialog2Title = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2TopTitle"]).GetComponentsInChildren<UILabel>(true)[0]; ;
        m_dialog2EquipIconFg = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2IconFg"]).GetComponentsInChildren<UISprite>(true)[0];
        m_dialog2EquipIconBg = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2IconBg"]).GetComponentsInChildren<UISprite>(true)[0];
        m_dialog2EquipName = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2EquipName"]).GetComponentsInChildren<UILabel>(true)[0];
        m_dialog2LevelNeed = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2NeedLevel"]).GetComponentsInChildren<UILabel>(true)[0];

        m_lblJewelListDesc = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageText"]).GetComponentsInChildren<UILabel>(true)[0];

        m_texInsetSucessSign = m_myTransform.FindChild(m_widgetToFullName["InsetUISucessSign"]).GetComponentsInChildren<UITexture>(true)[0];
        m_texComposeSucessSign = m_myTransform.FindChild(m_widgetToFullName["InsetUIComposeSucessSign"]).GetComponentsInChildren<UITexture>(true)[0];

        m_myTransform.FindChild(m_widgetToFullName["InsetDialog1Buy"]).gameObject.AddComponent<MogoUIListener>().MogoOnClick =
        () =>
        {
            EventDispatcher.TriggerEvent(InsetManager.ON_BUY);
        };

        for (int i = 0; i < 4; ++i)
        {
            m_arrInsetHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
            m_arrInsetHoleUnloadSign[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "Unload"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
            m_arrInsetHoleUpSign[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "Update"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
            m_arrInsetHoleTooltip[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "ToolTip"]).gameObject;
            m_arrInsetHoleBGDown[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "BG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
            m_arrInsetHoleBGUp[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "BGUp"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
            m_arrInsetHoleTypeName[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "TypeName"]).GetComponentsInChildren<UILabel>(true)[0];
        }

        for (int i = 0; i < 6; ++i)
        {
            m_gotransformList.Add(m_myTransform.FindChild(m_widgetToFullName["transformList" + i]).gameObject);
        }

        for (int i = 0; i < 6; i++)
        {
            if (i > 0)
            {
                m_gotransformList[i].transform.localPosition = new Vector3(
                    m_gotransformList[0].transform.localPosition.x + PACKAGEITEMNUMONEPAGE * PACKAGEITEMSPACE * i,
                    m_gotransformList[i].transform.localPosition.y,
                    m_gotransformList[i].transform.localPosition.z);
            }
        }

        bool m_bIsAllLoaded = false;

        for (int i = 0; i < ICONGRIDNUM; ++i)
        {
            int index = i;

            AssetCacheMgr.GetUIInstance("StrenthenDialogIconGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj = (GameObject)go;
                obj.transform.parent = m_transInsetDialogIconList;
                obj.transform.localPosition = new Vector3(0, ICONGRIDSPACE * index, 0);
                obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 1);
                obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragIconCamera;
                obj.GetComponentsInChildren<MyDragCamera>(true)[0].m_goDraggableArea = m_goPackageArea;
                obj.name = "InsetIconListIcon" + index.ToString();
                var s = m_transInsetDialogIconList.GetComponentsInChildren<MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
                s.SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);
                obj.AddComponent<InsetUIEquipmentGrid>().id = index;

                m_listEquipmentGrid.Add(obj);

                if (m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    // 滑动形式需要处理(翻页不需要设置)
                    if (!m_dragableIconCamera.IsMovePage)
                    {
                        m_dragableIconCamera.FPageHeight = ICONGRIDSPACE * ICON_GRID_ONE_PAGE;
                        m_dragableIconCamera.MAXY = ICON_OFFSET_Y;
                        if (m_listEquipmentGrid.Count > ICON_GRID_ONE_PAGE)
                            m_dragableIconCamera.MINY = (m_listEquipmentGrid.Count - ICON_GRID_ONE_PAGE) * ICONGRIDSPACE + ICON_OFFSET_Y;
                        else
                            m_dragableIconCamera.MINY = m_dragableIconCamera.MAXY;
                    }                 
                }

                if (!m_bIsAllLoaded && m_listPackageGrid.Count == PACKAGEITEMNUM && m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EventDispatcher.TriggerEvent(InsetManager.ON_INSET_SHOW);

                    if (MogoUIManager.Instance.InsetUILoaded != null)
                    {
                        MogoUIManager.Instance.InsetUILoaded();
                        MogoUIManager.Instance.InsetUILoaded = null;
                    }               

                    m_bIsAllLoaded = true;                 
                }

                if (index == 0)
                    InsetTabDown(index);
                else
                    InsetTabUp(index);
            });
        }

        for (int i = 0; i < PACKAGEITEMNUM; ++i)
        {
            int index = i;
            AssetCacheMgr.GetUIInstance("InsetDialogPackageGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj = (GameObject)go;
                obj.name = "InsetDialogPackageGrid" + index;
                obj.transform.parent = m_transPackageItemList;
                obj.transform.localPosition = new Vector3(PACKAGEITEMSPACE * index - 0.012f, 0, 0);
                obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 1);
                m_listItemFG.Add(obj.transform.GetComponentsInChildren<UISlicedSprite>(true)[1]);
                m_listItemNum.Add(obj.transform.GetComponentsInChildren<UILabel>(true)[0]);
                m_listItemBG.Add(obj.transform.GetComponentsInChildren<UISlicedSprite>(true)[0]);
                obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;

                obj.AddComponent<InsetUIPackageGrid>().ID = index;

                m_listPackageGrid.Add(obj);

                if (!m_bIsAllLoaded && m_listPackageGrid.Count == PACKAGEITEMNUM && m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EventDispatcher.TriggerEvent(InsetManager.ON_INSET_SHOW);

                    if (MogoUIManager.Instance.InsetUILoaded != null)
                    {
                        //Debug.LogError("InsetUILoaded != null");
                        MogoUIManager.Instance.InsetUILoaded();
                        MogoUIManager.Instance.InsetUILoaded = null;
                    }
                    //else
                    //{
                    //    Debug.LogError("InsetUILoaded == null");
                    //}

                    m_bIsAllLoaded = true;
                    MogoGlobleUIManager.Instance.ShowWaitingTip(false);
                }
            });
        }
    }
コード例 #42
0
 private void OnListPageMove(UILabel lbl, MyDragableCamera camera, int count, int gap, float pageHeight)
 {
     Mogo.Util.LoggerHelper.Debug("OnListPageMove:" + lbl.name + ",count:" + count + ",gap:" + gap + ",pageHeight:" + pageHeight);
     lbl.text = GetPageNumStr(camera, GetPageNum(count, gap, pageHeight));
 }
コード例 #43
0
    private void InitMyTongUIObj()
    {
        m_myTong = GetUIChild("MyTong");
        m_myTongChairmanName = GetUIChild("MyTongChairmanText").GetComponent<UILabel>();
        m_myTongNum = GetUIChild("MyTongNumText").GetComponent<UILabel>();
        m_myTongMoney = GetUIChild("MyTongMoneyText").GetComponent<UILabel>();
        m_myTongNotice = GetUIChild("MyTongNoticeMsgText").GetComponent<UILabel>();

        m_myTongMemberListIsNew = GetUIChild("MyTongMemberBtnIcon").GetComponent<UISprite>();
        m_myTongSkillIsNew = GetUIChild("MyTongSkillBtnIcon").GetComponent<UISprite>();
        m_myTongDragonIsNew = GetUIChild("MyTongDragonBtnIcon").GetComponent<UISprite>();
        m_myTongWarIsNew = GetUIChild("MyTongWarBtnIcon").GetComponent<UISprite>();

        //公会成员
        m_myTongMember = GetUIChild("MyTongMember");
        m_myTongMemberTabList = GetUIChild("MyTongMemberTab").GetComponent<MogoSingleButtonList>();

        //成员列表
        m_myTongMemberList = GetUIChild("MyTongMemberList");
        m_myTongMemberListCamera = GetUIChild("MyTongMemberListContentCamera");
        m_myTongMemberListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent<Camera>();
        m_myTongMemberListPageNunm = GetUIChild("MyTongMemberListPageNum").GetComponent<UILabel>();
        m_myTongMemberListContentRoot = GetUIChild("MyTongMemberListContent");
        m_myTongMemberListButtonList = m_myTongMemberListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongMemberListCameraBegin = GetUIChild("MyTongMemberListContentPosBegin");
        m_myTongMemberListPageHeight = GetUIChild("MyTongMemberListContentBG").localScale.y;
        m_myTongMemberListCp = GetUIChild("MyTongMemberListCp");
        m_myTongMemberListDragCamera = m_myTongMemberListCamera.GetComponent<MyDragableCamera>();
        m_myTongMemberListDragCamera.MovePageDone +=
            () =>
            {
                OnListPageMove(m_myTongMemberListPageNunm, m_myTongMemberListDragCamera, m_myTongMemberDataList.Count, 100, m_myTongMemberListPageHeight);
            };
        //test data
        //m_myTongMemberDataList = new List<MemberData>();
        //for (int i = 0; i < 20; i++)
        //{
        //    MemberData data = new MemberData() { contribution = i.ToString(), date = i.ToString(), level = i.ToString(), name = i.ToString(), position = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongMemberDataList.Add(data);

        //}

        //申请者列表
        m_myTongApplicantList = GetUIChild("MyTongApplicantList");
        m_myTongApplicantListCamera = GetUIChild("MyTongApplicantListContentCamera");
        m_myTongApplicantListDragCamera = m_myTongApplicantListCamera.GetComponent<MyDragableCamera>();
        m_myTongApplicantListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent<Camera>();
        m_myTongApplicantListContentRoot = GetUIChild("MyTongApplicantListContent");
        //m_myTongApplicantListButtonList = m_myTongApplicantListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongApplicantListCameraBegin = GetUIChild("MyTongApplicantListContentPosBegin");
        m_myTongApplicantListPageHeight = GetUIChild("MyTongApplicantListContentBG").localScale.y;
        m_myTongApplicantListPageNunm = GetUIChild("MyTongApplicantListPageNum").GetComponent<UILabel>();

        m_myTongApplicantListDragCamera.MovePageDone +=
           () =>
           {
               OnListPageMove(m_myTongApplicantListPageNunm, m_myTongApplicantListDragCamera, m_myTongApplicantDataList.Count, 100, m_myTongApplicantListPageHeight);
           };
        //test data
        //m_myTongApplicantDataList = new List<ApplicantData>();
        //for (int i = 0; i < 10; i++)
        //{
        //    ApplicantData data = new ApplicantData() { level = i.ToString(), name = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongApplicantDataList.Add(data);

        //}

        //推荐列表
        m_myTongPresenterList = GetUIChild("MyTongPresenterList");
        m_myTongPresenterListCamera = GetUIChild("MyTongPresenterListContentCamera");
        m_myTongPresenterListDragCamera = m_myTongPresenterListCamera.GetComponent<MyDragableCamera>();
        m_myTongPresenterListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent<Camera>();
        m_myTongPresenterListContentRoot = GetUIChild("MyTongPresenterListContent");
        m_myTongPresenterListButtonList = m_myTongPresenterListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongPresenterListCameraBegin = GetUIChild("MyTongPresenterListContentPosBegin");
        m_myTongPresenterListPageHeight = GetUIChild("MyTongPresenterListContentBG").localScale.y;
        m_myTongPresenterListPageNunm = GetUIChild("MyTongPresenterListPageNum").GetComponent<UILabel>();

        m_myTongPresenterListDragCamera.MovePageDone +=
           () =>
           {
               OnListPageMove(m_myTongPresenterListPageNunm, m_myTongPresenterListDragCamera, m_myTongPresenterDataList.Count, 100, m_myTongPresenterListPageHeight);
           };
        //test data
        //m_myTongPresenterDataList = new List<PresenterData>();
        //for (int i = 0; i < 10; i++)
        //{
        //    PresenterData data = new PresenterData() { level = i.ToString(), name = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongPresenterDataList.Add(data);

        //}


        //技能列表
        m_myTongSkillList = GetUIChild("MyTongSkill");
        m_myTongSkillListCamera = GetUIChild("MyTongSkillListCamera");
        m_myTongSkillListDragCamera = m_myTongSkillListCamera.GetComponent<MyDragableCamera>();
        m_myTongSkillListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent<Camera>();
        m_myTongSkillListContentRoot = GetUIChild("MyTongSkillList");
        //m_myTongPresenterListButtonList = m_myTongPresenterListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongSkillListCameraBegin = GetUIChild("MyTongSkillListPosBegin");
        m_myTongSkillListPageWidth = GetUIChild("MyTongSkillListBG").localScale.x;

        m_myTongSkillListDragCamera.MovePageDone +=
           () =>
           {
           };
        //test data
        //m_myTongSkillDataList = new List<TongSkillData>();
        //for (int i = 0; i < 8; i++)
        //{
        //    TongSkillData data = new TongSkillData() { name = i.ToString(), effect1 = i.ToString(), effect2 = i.ToString(), icon = i.ToString(), starNum = i };
        //    m_myTongSkillDataList.Add(data);

        //}

        //龙鳞水晶
        m_myTongDragon = GetUIChild("MyTongDragon");
        m_myTongDragonLeftTimeLbl = GetUIChild("MyTongDragonBannerTimeText").GetComponent<UILabel>();
        m_myTongDragonImg = GetUIChild("MyTongDragonImg").GetComponent<UISprite>();
        m_myTongDragonProgressBar = GetUIChild("MyTongDragonProgressBar").GetComponent<MogoProgressBar>();
        m_myTongDragonCostlbl1 = GetUIChild("MyTongDragonBtn1Costlbl").GetComponent<UILabel>();
        m_myTongDragonCostlbl2 = GetUIChild("MyTongDragonBtn2Costlbl").GetComponent<UILabel>();
        m_myTongDragonCostlbl3 = GetUIChild("MyTongDragonBtn3Costlbl").GetComponent<UILabel>();

        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab1] = GetUIChild("MyTongMemberTab1Text").GetComponent<UILabel>();
        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab2] = GetUIChild("MyTongMemberTab2Text").GetComponent<UILabel>();
        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab3] = GetUIChild("MyTongMemberTab3Text").GetComponent<UILabel>();
        foreach (var pair in m_myTongMemberTabLabelList)
        {
            if (pair.Key == (int)MyTongMemberUITab.MyTongMemberTab1)
                MyTongMemberTabDown(pair.Key);
            else
                MyTongMemberTabUp(pair.Key);
        }
    }
コード例 #44
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_lisgGridGO = new List<GameObject>();
        m_listGridFG = new List<UISlicedSprite>();
        m_listGridBG = new List<UISlicedSprite>();
        m_listGridUp = new List<UISlicedSprite>();
        m_listGridUpBl = new List<UISprite>();
        m_listGridNum = new List<UILabel>();

        m_equipDetailLblEquip = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPutUpText"]).GetComponentsInChildren<UILabel>(true)[0];

        m_packageGold = m_myTransform.FindChild(m_widgetToFullName["GoldText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_packageDiamon = m_myTransform.FindChild(m_widgetToFullName["DiamonText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_packageVolume = m_myTransform.FindChild(m_widgetToFullName["PackageInfoNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_packageDragableCamera = m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_packageDragableCamera.OutOfBoundsMaxPage += OnOutOfBoundsMaxPage;
        m_packageDragableCamera.OutOfBoundsMinPage += OnOutOfBoundsMinPage;
        m_packageIcoSingleButtonList = FindTransform("PackageIconList").GetComponentsInChildren<MogoSingleButtonList>(true)[0];

        m_playerName = m_myTransform.FindChild(m_widgetToFullName["PlayerNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerLevel = m_myTransform.FindChild(m_widgetToFullName["PlayerLevelText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerNameAndLevel = m_myTransform.FindChild(m_widgetToFullName["PlayerNameAndLevelText"]).GetComponentsInChildren<UILabel>(true)[0];

        m_equipDetailName = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailNeedLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailNeedLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        //m_equipDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailNeedJob = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailNeedJobType"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailExtra = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailExtraText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipDetailImageFG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipDetailImageBG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipDetailImageUsed = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageUsed"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipTipCamera = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailBG"]).GetComponentsInChildren<SimpleDragCamera>(true)[0];

        m_equipCurrentDetailImageBG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipCurrentDetailName = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipCurrentDetailNeedLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailNeedLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        //m_equipCurrentDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipCurrentDetailNeedJob = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailNeedJobType"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipCurrentDetailExtra = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailExtraText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipCurrentDetailImageFG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipCurrentDetailImageUsed = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageUsed"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_equipCurrentTipCamera = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailBG"]).GetComponentsInChildren<SimpleDragCamera>(true)[0];

        m_playerDetailCDDecrease = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCDDecreaseNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailCrit = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCritNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailHit = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeHitNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailPVP = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePVPNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWreck = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWreckNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_playerDetailPiercing = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePiercingNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailExplosionBonus = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeExplosionBonusNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_playerDetailCritResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCritResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailDefense = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeDefenceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailHealth = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeHealthNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailPVE = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePVENum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailSpeedUp = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeSpeedUpNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWreckResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWreckResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_playerDetailEarthElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeEarthElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWindElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWindElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWaterElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWaterElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailFireElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeFireElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailGoldElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeGoldElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_playerDetailEarthElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeEarthElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWindElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWindElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailWaterElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWaterElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailFireElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeFireElemResistenceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerDetailGoldElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeGoldElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0];

        //m_packageInfoDetailPackage = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPackage"]).gameObject;
        //m_packageInfoDetailPlayer = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPlayer"]).gameObject;


        m_playerInfoEXP = m_myTransform.FindChild(m_widgetToFullName["PlayerExpFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0];
        m_playerInfoEnergy = m_myTransform.FindChild(m_widgetToFullName["PlayerEnergyFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0];

        m_playerInfoExpNum = m_myTransform.FindChild(m_widgetToFullName["PlayerExpNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoEnergyNum = m_myTransform.FindChild(m_widgetToFullName["PlayerEnergyNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoJob = m_myTransform.FindChild(m_widgetToFullName["PlayerJobName"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoHealth = m_myTransform.FindChild(m_widgetToFullName["PlayerBloodNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerAttackNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoDefense = m_myTransform.FindChild(m_widgetToFullName["PlayerDefenceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_playerInfoPower = m_myTransform.FindChild(m_widgetToFullName["PlayerPowerInfoNum"]).GetComponentsInChildren<UILabel>(true)[0];


        m_diamondTipLevel = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_diamondTipType = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailTypeNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_diamondTipDesc = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_diamondTipName = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_ssDiamondTipIcon = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_diamondTipIconBg = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0];
        m_diamondMaxStack = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailMaxStackNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_diamondInfoTip = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoTip"]).gameObject;
        m_socialTip = m_myTransform.FindChild(m_widgetToFullName["SocialTip"]).gameObject;

        m_materialTipName = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_materialTipLevel = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_materialTipStack = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailStackNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_materialTipDecs = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_materialTipPrice = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailPriceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_materialTipPriceIcon = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailPriceIcon"]).GetComponentsInChildren<UISprite>(true)[0];
        m_materialTipIcon = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_materialTipIconBg = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0];
        m_materialTip = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoTip"]).gameObject;

        m_propTipName = m_myTransform.FindChild(m_widgetToFullName["PropInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_propTipStack = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailStackNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_propTipDecs = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_propTipPrice = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailPriceNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_propTipPriceIcon = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailPriceIcon"]).GetComponentsInChildren<UISprite>(true)[0];
        m_propTipIcon = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_propTipIconBg = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0];
        m_propTip = m_myTransform.FindChild(m_widgetToFullName["PropInfoTip"]).gameObject;
        m_propTipUseBtn = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailCompose"]).gameObject;


        m_equipSlotBelt = m_myTransform.FindChild(m_widgetToFullName["BeltText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotBreast = m_myTransform.FindChild(m_widgetToFullName["BreastPlateText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotCuish = m_myTransform.FindChild(m_widgetToFullName["CuishText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotHand = m_myTransform.FindChild(m_widgetToFullName["HandGuardText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotHead = m_myTransform.FindChild(m_widgetToFullName["HeadEquipText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotNecklace = m_myTransform.FindChild(m_widgetToFullName["NecklaceText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotRingLeft = m_myTransform.FindChild(m_widgetToFullName["RingLeftText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotRingRight = m_myTransform.FindChild(m_widgetToFullName["RingRightText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotShoes = m_myTransform.FindChild(m_widgetToFullName["ShoesText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotShouders = m_myTransform.FindChild(m_widgetToFullName["ShoudersText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_equipSlotWeapon = m_myTransform.FindChild(m_widgetToFullName["WeaponText"]).GetComponentsInChildren<UILabel>(true)[0];

        m_lblDialogTitle = m_myTransform.FindChild(m_widgetToFullName["DialogTitle"]).GetComponentsInChildren<UILabel>(true)[0];

        m_goPackageItemGridList = m_myTransform.FindChild(m_widgetToFullName["PackageItemGridList"]).gameObject;

        m_myTransform.FindChild(m_widgetToFullName["EquipModelImageBG"]).gameObject.AddComponent<EquipModelImge>();

        m_texShowCharacterWinBG = m_myTransform.FindChild(m_widgetToFullName["PlayerEquipBGTexBG"]).GetComponentsInChildren<UITexture>(true)[0];


        for (int i = 0; i < DIAMONDHOLENUM; ++i)
        {
            //m_equipDetailDiamondHoleInfo[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDiamonHole" + i + "Text"]).GetComponentsInChildren<UILabel>(true)[0];
            //m_equipCurrentDetailDiamondHoleInfo[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDiamonHole" + i + "Text"]).GetComponentsInChildren<UILabel>(true)[0];
        }

        //string _GridWidgetName = "Item";

        //for (int i = 0; i < VOLUME; ++i)
        //{
        //    m_listGridFG.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]);
        //    m_listGridUp.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "Up"]).GetComponentsInChildren<UISlicedSprite>(true)[0]);
        //    m_listGridNum.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "Num"]).GetComponentsInChildren<UILabel>(true)[0]);
        //}

        for (int i = 0; i < 4; ++i)
        {
            //m_arrNewDiamondHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDiamonHole" + (i + 9) + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0].gameObject;
            //m_arrCurrentDiamondHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDiamonHole" + (i + 9) + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0].gameObject;
        }

        basicAttr = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailBasicAttribute"]).gameObject;
        elemAttr = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailElementAttribute"]).gameObject;

        Camera mySourceCam = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = mySourceCam;

        m_myTransform.FindChild(m_widgetToFullName["EquipCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = mySourceCam;

        for (int i = 0; i < 40; ++i)
        {
            AddPacakgeItemGrid(MogoUIManager.Instance.CommonAtlas);
        }

        m_menuTabUpLabelList[(int)MenuUITab.PlayerTab] = m_myTransform.FindChild(m_widgetToFullName["IconPlayerTextUp"]).GetComponent<UILabel>();
        m_menuTabUpLabelList[(int)MenuUITab.PackageTab] = m_myTransform.FindChild(m_widgetToFullName["IconPackageTextUp"]).GetComponent<UILabel>();
        m_menuTabUpLabelList[(int)MenuUITab.SkillTab] = m_myTransform.FindChild(m_widgetToFullName["IconSkillTextUp"]).GetComponent<UILabel>();
        m_menuTabUpLabelList[(int)MenuUITab.TongTab] = m_myTransform.FindChild(m_widgetToFullName["IconTongTextUp"]).GetComponent<UILabel>();
        m_menuTabUpLabelList[(int)MenuUITab.SocialTab] = m_myTransform.FindChild(m_widgetToFullName["IconSocialTextUp"]).GetComponent<UILabel>();
        m_menuTabUpLabelList[(int)MenuUITab.SettingsTab] = m_myTransform.FindChild(m_widgetToFullName["IconSettingsTextUp"]).GetComponent<UILabel>();

        m_menuTabDownLabelList[(int)MenuUITab.PlayerTab] = m_myTransform.FindChild(m_widgetToFullName["IconPlayerTextDown"]).GetComponent<UILabel>();
        m_menuTabDownLabelList[(int)MenuUITab.PackageTab] = m_myTransform.FindChild(m_widgetToFullName["IconPackageTextDown"]).GetComponent<UILabel>();
        m_menuTabDownLabelList[(int)MenuUITab.SkillTab] = m_myTransform.FindChild(m_widgetToFullName["IconSkillTextDown"]).GetComponent<UILabel>();
        m_menuTabDownLabelList[(int)MenuUITab.TongTab] = m_myTransform.FindChild(m_widgetToFullName["IconTongTextDown"]).GetComponent<UILabel>();
        m_menuTabDownLabelList[(int)MenuUITab.SocialTab] = m_myTransform.FindChild(m_widgetToFullName["IconSocialTextDown"]).GetComponent<UILabel>();
        m_menuTabDownLabelList[(int)MenuUITab.SettingsTab] = m_myTransform.FindChild(m_widgetToFullName["IconSettingsTextDown"]).GetComponent<UILabel>();
      
        m_packageTabLabelList[(int)PackageUITab.EquipmentTab] = m_myTransform.FindChild(m_widgetToFullName["NormalIconText"]).GetComponent<UILabel>();
        m_packageTabLabelList[(int)PackageUITab.JewelTab] = m_myTransform.FindChild(m_widgetToFullName["GemIconText"]).GetComponent<UILabel>();
        m_packageTabLabelList[(int)PackageUITab.MaterialTab] = m_myTransform.FindChild(m_widgetToFullName["MaterialIconText"]).GetComponent<UILabel>();
        foreach (var pair in m_packageTabLabelList)
        {
            if (pair.Key == (int)PackageUITab.EquipmentTab)
                PackageTabDown(pair.Key);
            else
                PackageTabUp(pair.Key);
        }

        m_playerDetailTabLabelList[(int)PlayerDetailUITab.BasicAttributeTab] = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailBasicAttributeButtonText"]).GetComponent<UILabel>();
        m_playerDetailTabLabelList[(int)PlayerDetailUITab.ElementAttributeTab] = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailElementAttributeButtonText"]).GetComponent<UILabel>();
        foreach (var pair in m_playerDetailTabLabelList)
        {
            if (pair.Key == (int)PlayerDetailUITab.BasicAttributeTab)
                PlayerDetailTabDown(pair.Key);
            else
                PlayerDetailTabUp(pair.Key);
        }
    }
コード例 #45
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Camera cam = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren <Camera>(true)[0];

        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera        = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera       = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera             = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITop"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera               = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITopRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera          = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera  = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITopLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera     = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUILeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera        = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera       = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITop"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera         = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomRight"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera       = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITop"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera               = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITop"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera           = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIBottomLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera    = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITopLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera       = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITopLeft"]).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera    = cam;

        m_camChooseServerGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_camChooseServerGridList.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = cam;

        m_dragableCameraChooseServerGridList            = m_camChooseServerGridList.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCameraChooseServerGridList.LeftArrow  = FindTransform("ChooseServerUIArrowL").gameObject;
        m_dragableCameraChooseServerGridList.RightArrow = FindTransform("ChooseServerUIArrowR").gameObject;

        m_lblCreateCharacterText            = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITitleText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblJobName                        = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoName"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblJobInfo                        = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoDetail"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblCharacterNameInput             = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).GetComponentsInChildren <UIInput>(true)[0];
        m_lblRecommendServerName            = m_myTransform.FindChild(m_widgetToFullName["RecommendServerUIServerName"]).GetComponentsInChildren <UILabel>(true)[0];
        m_goCreateCharacterDetailUIEnterBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtn"]).gameObject;
        m_lblEnter = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_spCreateCharacterDetailUIEnterBtnBGUp = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnBGUp"]).GetComponentsInChildren <UISprite>(true)[0];

        m_goCharacterNameInput = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).gameObject;
        m_goRandomBtn          = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRandomBtn"]).gameObject;

        m_goChooseCharcterGridList   = m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIList"]).gameObject;
        m_goJobAttrList              = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobAttrList"]).gameObject;
        m_goChooseServerGridList     = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridList"]).gameObject;
        m_goCreateCharacterUIBackBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBackBtn"]).gameObject;

        m_goChooseCharacterUI        = m_myTransform.FindChild("ChooseCharacterUI").gameObject;
        m_goChooseServerUI           = m_myTransform.FindChild("ChooseServerUI").gameObject;
        m_goCreateCharacterDetailUI  = m_myTransform.FindChild("CreateCharacterDetailUI").gameObject;
        m_goCreateCharacterUI        = m_myTransform.FindChild("CreateCharacterUI").gameObject;
        m_goRecommendServerUI        = m_myTransform.FindChild("RecommendServerUI").gameObject;
        m_goChooseServerGridPageList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerPageList"]).gameObject;

        m_MTBChooseCharacterUIServer = m_myTransform.FindChild("ChooseCharacterUI/ChooseCharacterUIBottomLeft/ChooseCharcterUIServerBtn").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];
        m_MTBCreateCharacterUIServer = m_myTransform.FindChild("CreateCharacterUI/CreateCharacterUIBottomRight/CreateCharacterUIServerBtn").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];
        m_MTBLatelyLog0 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn0").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];
        m_MTBLatelyLog1 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn1").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];

        m_goCreateCharacterDetailUIJobIconList = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobIconList"]).gameObject;

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

        m_atlasCanRelease = m_spResCtrl.atlas;

        m_goCurrentUI = m_goChooseCharacterUI;

        for (int i = 0; i < 4; ++i)
        {
            AssetCacheMgr.GetUIInstance("ChooseCharcterUIGrid.prefab", (prefab, id, go) =>
            {
                GameObject obj = (GameObject)go;

                obj.transform.parent = m_goChooseCharcterGridList.transform;

                obj.transform.localPosition = new Vector3(0, -m_listChooseCharacterGrid.Count * CHOOSECHARACTERGRIDHEIGHT, 0);
                obj.transform.localScale    = new Vector3(1, 1, 1);
                //obj.GetComponentsInChildren<ChooseCharacterUIGrid>(true)[0].Id = m_listChooseCharacterGrid.Count;
                obj.AddComponent <ChooseCharacterUIGrid>().Id = m_listChooseCharacterGrid.Count;
                m_goChooseCharcterGridList.GetComponentsInChildren <MogoSingleButtonList>(true)[0].SingleButtonList.Add(obj.GetComponentsInChildren <MogoSingleButton>(true)[0]);

                m_listChooseCharacterGrid.Add(obj);

                if (m_listChooseCharacterGrid.Count == 4)
                {
                    TruelyFillChooseCharacterGridData();
                    TruelySetCharacterGridDown();
                    MogoGlobleUIManager.Instance.ShowWaitingTip(false);
                }
            });
        }



        for (int i = 0; i < 3; ++i)
        {
            AssetCacheMgr.GetUIInstance("CreateCharacterDetailUIJobAttr.prefab", (prefab, id, go) =>
            {
                GameObject obj = (GameObject)go;

                obj.transform.parent = m_goJobAttrList.transform;

                obj.transform.localPosition = new Vector3(0, -m_listJobAttr.Count * JOBATTRGRIDHEIGHT, 0);
                obj.transform.localScale    = new Vector3(1, 1, 1);

                obj.AddComponent <CreateCharacterDetailUIJobAttr>();

                m_listJobAttr.Add(obj);
            });
        }

        Initialize();
        inited = true;
    }
コード例 #46
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Camera cam = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];

        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITopRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUILeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;

        m_camChooseServerGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_camChooseServerGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = cam;

        m_dragableCameraChooseServerGridList = m_camChooseServerGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCameraChooseServerGridList.LeftArrow = FindTransform("ChooseServerUIArrowL").gameObject;
        m_dragableCameraChooseServerGridList.RightArrow = FindTransform("ChooseServerUIArrowR").gameObject;

        m_lblCreateCharacterText = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITitleText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblJobName = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoName"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblJobInfo = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoDetail"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblCharacterNameInput = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).GetComponentsInChildren<UIInput>(true)[0];
        m_lblRecommendServerName = m_myTransform.FindChild(m_widgetToFullName["RecommendServerUIServerName"]).GetComponentsInChildren<UILabel>(true)[0];
        m_goCreateCharacterDetailUIEnterBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtn"]).gameObject;
        m_lblEnter = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_spCreateCharacterDetailUIEnterBtnBGUp = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnBGUp"]).GetComponentsInChildren<UISprite>(true)[0];

        m_goCharacterNameInput = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).gameObject;
        m_goRandomBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRandomBtn"]).gameObject;

        m_goChooseCharcterGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIList"]).gameObject;
        m_goJobAttrList = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobAttrList"]).gameObject;
        m_goChooseServerGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridList"]).gameObject;
        m_goCreateCharacterUIBackBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBackBtn"]).gameObject;

        m_goChooseCharacterUI = m_myTransform.FindChild("ChooseCharacterUI").gameObject;
        m_goChooseServerUI = m_myTransform.FindChild("ChooseServerUI").gameObject;
        m_goCreateCharacterDetailUI = m_myTransform.FindChild("CreateCharacterDetailUI").gameObject;
        m_goCreateCharacterUI = m_myTransform.FindChild("CreateCharacterUI").gameObject;
        m_goRecommendServerUI = m_myTransform.FindChild("RecommendServerUI").gameObject;
        m_goChooseServerGridPageList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerPageList"]).gameObject;

        m_MTBChooseCharacterUIServer = m_myTransform.FindChild("ChooseCharacterUI/ChooseCharacterUIBottomLeft/ChooseCharcterUIServerBtn").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
        m_MTBCreateCharacterUIServer = m_myTransform.FindChild("CreateCharacterUI/CreateCharacterUIBottomRight/CreateCharacterUIServerBtn").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
        m_MTBLatelyLog0 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn0").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
        m_MTBLatelyLog1 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn1").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];

        m_goCreateCharacterDetailUIJobIconList = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobIconList"]).gameObject;

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

        m_atlasCanRelease = m_spResCtrl.atlas;

        m_goCurrentUI = m_goChooseCharacterUI;

        for (int i = 0; i < 4; ++i)
        {
            AssetCacheMgr.GetUIInstance("ChooseCharcterUIGrid.prefab", (prefab, id, go) =>
            {
                GameObject obj = (GameObject)go;

                obj.transform.parent = m_goChooseCharcterGridList.transform;

                obj.transform.localPosition = new Vector3(0, -m_listChooseCharacterGrid.Count * CHOOSECHARACTERGRIDHEIGHT, 0);
                obj.transform.localScale = new Vector3(1, 1, 1);
                //obj.GetComponentsInChildren<ChooseCharacterUIGrid>(true)[0].Id = m_listChooseCharacterGrid.Count;
                obj.AddComponent<ChooseCharacterUIGrid>().Id = m_listChooseCharacterGrid.Count;
                m_goChooseCharcterGridList.GetComponentsInChildren<MogoSingleButtonList>(true)[0].SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);

                m_listChooseCharacterGrid.Add(obj);

                if (m_listChooseCharacterGrid.Count == 4)
                {
                    TruelyFillChooseCharacterGridData();
                    TruelySetCharacterGridDown();
                    MogoGlobleUIManager.Instance.ShowWaitingTip(false);
                }
            });
        }



        for (int i = 0; i < 3; ++i)
        {
            AssetCacheMgr.GetUIInstance("CreateCharacterDetailUIJobAttr.prefab", (prefab, id, go) =>
            {
                GameObject obj = (GameObject)go;

                obj.transform.parent = m_goJobAttrList.transform;

                obj.transform.localPosition = new Vector3(0, -m_listJobAttr.Count * JOBATTRGRIDHEIGHT, 0);
                obj.transform.localScale = new Vector3(1, 1, 1);

                obj.AddComponent<CreateCharacterDetailUIJobAttr>();

                m_listJobAttr.Add(obj);
            });
        }

        Initialize();
        inited = true;
    }
コード例 #47
0
    void Awake()
    {
        m_myTransform = transform;
        FillFullNameData(m_myTransform);
        m_instance = m_myTransform.GetComponentsInChildren<InstanceMissionChooseUIViewManager>(true)[0];

        m_lblSweepNum = m_myTransform.FindChild(m_widgetToFullName["InstanceLeftChallengeNum"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblResetNum = m_myTransform.FindChild(m_widgetToFullName["InstanceLeftResetNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_camInstanceMissionChooseUI = FindTransform("InstanceMissionChooseUICamera").GetComponentsInChildren<Camera>(true)[0];
        m_uicamInstanceMissionChooseUI = m_myTransform.FindChild(m_widgetToFullName["InstanceMissionChooseUICamera"]).GetComponentsInChildren<UICamera>(true)[0];
  
        m_goInstanceMissionChooseUIMapListGrid = m_myTransform.FindChild(m_widgetToFullName["InstanceMissionChooseUIMapListGrid"]).gameObject;
        m_tranInstanceMissionChooseUIPageDOT = FindTransform("InstanceMissionChooseUIPageDOT");
        m_goGOInstanceMissionChooseUI = m_myTransform.FindChild(m_widgetToFullName["GOInstanceMissionChooseUI"]).gameObject;
        m_goGOInstanceMissionChooseUI.SetActive(false);

        m_goGOInstanceMissionChooseUIMapList = FindTransform("GOInstanceMissionChooseUIMapList").gameObject;
        m_goGOInstanceMissionChooseUINormal = FindTransform("GOInstanceMissionChooseUINormal").gameObject;
        m_goGOInstanceMissionChooseUIRandom = FindTransform("GOInstanceMissionChooseUIRandom").gameObject;

        m_chooseMogoSingleButtonList = FindTransform("InstanceMissionChooseUIChoose").GetComponentsInChildren<MogoSingleButtonList>(true)[0];
        m_chooseMogoSingleButtonList.SetCurrentDownButton(0);
        m_lblInstanceMissionChooseUIChooseNormalText = FindTransform("InstanceMissionChooseUIChooseNormalText").GetComponentsInChildren<UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseNormalTextDown = FindTransform("InstanceMissionChooseUIChooseNormalTextDown").GetComponentsInChildren<UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseRandomText = FindTransform("InstanceMissionChooseUIChooseRandomText").GetComponentsInChildren<UILabel>(true)[0];
        m_lblInstanceMissionChooseUIChooseRandomTextDown = FindTransform("InstanceMissionChooseUIChooseRandomTextDown").GetComponentsInChildren<UILabel>(true)[0];
        m_lblInstanceMissionChooseUIRandomBtnEnterTip = FindTransform("InstanceMissionChooseUIRandomBtnEnterTip").GetComponentsInChildren<UILabel>(true)[0];

        m_spInstanceMissionChooseUIChooseRandomBGUp = FindTransform("InstanceMissionChooseUIChooseRandomBGUp").GetComponentsInChildren<UISprite>(true)[0];
        m_spInstanceMissionChooseUIChooseRandomBGDown = FindTransform("InstanceMissionChooseUIChooseRandomBGDown").GetComponentsInChildren<UISprite>(true)[0];

        m_dragCamera = m_myTransform.FindChild(m_widgetToFullName["InstanceMissionChooseUIMapListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        Camera SourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = SourceCamera;

        m_dragableCameraMapList = m_dragCamera.transform.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCameraMapList.LeftArrow = FindTransform("InstanceMissionChooseUIArrowL").gameObject;
        m_dragableCameraMapList.RightArrow = FindTransform("InstanceMissionChooseUIArrowR").gameObject;

        FillNewInstanceUIChooseGridData();

        // 随机副本特效
        m_goInstanceMissionChooseUIRandomFx = FindTransform("InstanceMissionChooseUIRandomFx").gameObject;

        // ChineseData
        m_lblInstanceMissionChooseUIChooseRandomText.text = LanguageData.GetContent(46975);
        m_lblInstanceMissionChooseUIChooseRandomTextDown.text = LanguageData.GetContent(46975);
        m_lblInstanceMissionChooseUIRandomBtnEnterTip.text = LanguageData.GetContent(46976);

        Initialize();
    }
コード例 #48
0
    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_dragCamera = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].topLeft = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].bottomRight = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableCamera = m_dragCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow = FindTransform("ComposeDialogIconListArrowU").gameObject;
        m_dragableCamera.RightArrow = FindTransform("ComposeDialogIconListArrowD").gameObject;

        m_transPanelTable = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListPanelTable"]);

        m_goGOComposeDialogBodyPearlUp = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlUp"]).gameObject;
        m_goGOComposeDialogBodyPearlLeft = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlLeft"]).gameObject;
        m_goGOComposeDialogBodyPearlRight = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlRight"]).gameObject;
        m_goGOComposeDialogBodyPearlFinal = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlFinal"]).gameObject;
        m_goGOComposeDialogBodyPearlUp.AddComponent<InventoryGrid>();
        m_goGOComposeDialogBodyPearlLeft.AddComponent<InventoryGrid>();
        m_goGOComposeDialogBodyPearlRight.AddComponent<InventoryGrid>();
        m_goGOComposeDialogBodyPearlFinal.AddComponent<InventoryGrid>();

        m_ssComposePearlLeft = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlLeft"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_ssComposePearlRight = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlRight"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_ssComposePearlUp = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlUp"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
        m_ssComposePearlFinal = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlFinal"]).GetComponentsInChildren<UISlicedSprite>(true)[0];

        m_goComposeNowBtn = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogComposeNow"]).gameObject;
        m_goComposeBtn = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogCompose"]).gameObject;

        for (int i = 0; i < 9; ++i)
        {
            m_bGridStatus[i] = false;
        }

        m_texUIBG = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyBGThing0"]).GetComponentsInChildren<UITexture>(true)[0];
    }
コード例 #49
0
    private void InitMyTongUIObj()
    {
        m_myTong             = GetUIChild("MyTong");
        m_myTongChairmanName = GetUIChild("MyTongChairmanText").GetComponent <UILabel>();
        m_myTongNum          = GetUIChild("MyTongNumText").GetComponent <UILabel>();
        m_myTongMoney        = GetUIChild("MyTongMoneyText").GetComponent <UILabel>();
        m_myTongNotice       = GetUIChild("MyTongNoticeMsgText").GetComponent <UILabel>();

        m_myTongMemberListIsNew = GetUIChild("MyTongMemberBtnIcon").GetComponent <UISprite>();
        m_myTongSkillIsNew      = GetUIChild("MyTongSkillBtnIcon").GetComponent <UISprite>();
        m_myTongDragonIsNew     = GetUIChild("MyTongDragonBtnIcon").GetComponent <UISprite>();
        m_myTongWarIsNew        = GetUIChild("MyTongWarBtnIcon").GetComponent <UISprite>();

        //公会成员
        m_myTongMember        = GetUIChild("MyTongMember");
        m_myTongMemberTabList = GetUIChild("MyTongMemberTab").GetComponent <MogoSingleButtonList>();

        //成员列表
        m_myTongMemberList       = GetUIChild("MyTongMemberList");
        m_myTongMemberListCamera = GetUIChild("MyTongMemberListContentCamera");
        m_myTongMemberListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_myTongMemberListPageNunm                 = GetUIChild("MyTongMemberListPageNum").GetComponent <UILabel>();
        m_myTongMemberListContentRoot              = GetUIChild("MyTongMemberListContent");
        m_myTongMemberListButtonList               = m_myTongMemberListContentRoot.GetComponent <MogoSingleButtonList>();
        m_myTongMemberListCameraBegin              = GetUIChild("MyTongMemberListContentPosBegin");
        m_myTongMemberListPageHeight               = GetUIChild("MyTongMemberListContentBG").localScale.y;
        m_myTongMemberListCp                       = GetUIChild("MyTongMemberListCp");
        m_myTongMemberListDragCamera               = m_myTongMemberListCamera.GetComponent <MyDragableCamera>();
        m_myTongMemberListDragCamera.MovePageDone +=
            () =>
        {
            OnListPageMove(m_myTongMemberListPageNunm, m_myTongMemberListDragCamera, m_myTongMemberDataList.Count, 100, m_myTongMemberListPageHeight);
        };
        //test data
        //m_myTongMemberDataList = new List<MemberData>();
        //for (int i = 0; i < 20; i++)
        //{
        //    MemberData data = new MemberData() { contribution = i.ToString(), date = i.ToString(), level = i.ToString(), name = i.ToString(), position = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongMemberDataList.Add(data);

        //}

        //申请者列表
        m_myTongApplicantList           = GetUIChild("MyTongApplicantList");
        m_myTongApplicantListCamera     = GetUIChild("MyTongApplicantListContentCamera");
        m_myTongApplicantListDragCamera = m_myTongApplicantListCamera.GetComponent <MyDragableCamera>();
        m_myTongApplicantListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_myTongApplicantListContentRoot = GetUIChild("MyTongApplicantListContent");
        //m_myTongApplicantListButtonList = m_myTongApplicantListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongApplicantListCameraBegin = GetUIChild("MyTongApplicantListContentPosBegin");
        m_myTongApplicantListPageHeight  = GetUIChild("MyTongApplicantListContentBG").localScale.y;
        m_myTongApplicantListPageNunm    = GetUIChild("MyTongApplicantListPageNum").GetComponent <UILabel>();

        m_myTongApplicantListDragCamera.MovePageDone +=
            () =>
        {
            OnListPageMove(m_myTongApplicantListPageNunm, m_myTongApplicantListDragCamera, m_myTongApplicantDataList.Count, 100, m_myTongApplicantListPageHeight);
        };
        //test data
        //m_myTongApplicantDataList = new List<ApplicantData>();
        //for (int i = 0; i < 10; i++)
        //{
        //    ApplicantData data = new ApplicantData() { level = i.ToString(), name = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongApplicantDataList.Add(data);

        //}

        //推荐列表
        m_myTongPresenterList           = GetUIChild("MyTongPresenterList");
        m_myTongPresenterListCamera     = GetUIChild("MyTongPresenterListContentCamera");
        m_myTongPresenterListDragCamera = m_myTongPresenterListCamera.GetComponent <MyDragableCamera>();
        m_myTongPresenterListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_myTongPresenterListContentRoot = GetUIChild("MyTongPresenterListContent");
        m_myTongPresenterListButtonList  = m_myTongPresenterListContentRoot.GetComponent <MogoSingleButtonList>();
        m_myTongPresenterListCameraBegin = GetUIChild("MyTongPresenterListContentPosBegin");
        m_myTongPresenterListPageHeight  = GetUIChild("MyTongPresenterListContentBG").localScale.y;
        m_myTongPresenterListPageNunm    = GetUIChild("MyTongPresenterListPageNum").GetComponent <UILabel>();

        m_myTongPresenterListDragCamera.MovePageDone +=
            () =>
        {
            OnListPageMove(m_myTongPresenterListPageNunm, m_myTongPresenterListDragCamera, m_myTongPresenterDataList.Count, 100, m_myTongPresenterListPageHeight);
        };
        //test data
        //m_myTongPresenterDataList = new List<PresenterData>();
        //for (int i = 0; i < 10; i++)
        //{
        //    PresenterData data = new PresenterData() { level = i.ToString(), name = i.ToString(), power = i.ToString(), vocationIcon = i.ToString() };
        //    m_myTongPresenterDataList.Add(data);

        //}


        //技能列表
        m_myTongSkillList           = GetUIChild("MyTongSkill");
        m_myTongSkillListCamera     = GetUIChild("MyTongSkillListCamera");
        m_myTongSkillListDragCamera = m_myTongSkillListCamera.GetComponent <MyDragableCamera>();
        m_myTongSkillListCamera.GetComponent <UIViewport>().sourceCamera = GameObject.Find("GlobleUICamera").GetComponent <Camera>();
        m_myTongSkillListContentRoot = GetUIChild("MyTongSkillList");
        //m_myTongPresenterListButtonList = m_myTongPresenterListContentRoot.GetComponent<MogoSingleButtonList>();
        m_myTongSkillListCameraBegin = GetUIChild("MyTongSkillListPosBegin");
        m_myTongSkillListPageWidth   = GetUIChild("MyTongSkillListBG").localScale.x;

        m_myTongSkillListDragCamera.MovePageDone +=
            () =>
        {
        };
        //test data
        //m_myTongSkillDataList = new List<TongSkillData>();
        //for (int i = 0; i < 8; i++)
        //{
        //    TongSkillData data = new TongSkillData() { name = i.ToString(), effect1 = i.ToString(), effect2 = i.ToString(), icon = i.ToString(), starNum = i };
        //    m_myTongSkillDataList.Add(data);

        //}

        //龙鳞水晶
        m_myTongDragon            = GetUIChild("MyTongDragon");
        m_myTongDragonLeftTimeLbl = GetUIChild("MyTongDragonBannerTimeText").GetComponent <UILabel>();
        m_myTongDragonImg         = GetUIChild("MyTongDragonImg").GetComponent <UISprite>();
        m_myTongDragonProgressBar = GetUIChild("MyTongDragonProgressBar").GetComponent <MogoProgressBar>();
        m_myTongDragonCostlbl1    = GetUIChild("MyTongDragonBtn1Costlbl").GetComponent <UILabel>();
        m_myTongDragonCostlbl2    = GetUIChild("MyTongDragonBtn2Costlbl").GetComponent <UILabel>();
        m_myTongDragonCostlbl3    = GetUIChild("MyTongDragonBtn3Costlbl").GetComponent <UILabel>();

        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab1] = GetUIChild("MyTongMemberTab1Text").GetComponent <UILabel>();
        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab2] = GetUIChild("MyTongMemberTab2Text").GetComponent <UILabel>();
        m_myTongMemberTabLabelList[(int)MyTongMemberUITab.MyTongMemberTab3] = GetUIChild("MyTongMemberTab3Text").GetComponent <UILabel>();
        foreach (var pair in m_myTongMemberTabLabelList)
        {
            if (pair.Key == (int)MyTongMemberUITab.MyTongMemberTab1)
            {
                MyTongMemberTabDown(pair.Key);
            }
            else
            {
                MyTongMemberTabUp(pair.Key);
            }
        }
    }
コード例 #50
0
    void Awake()
    {
        m_instance    = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        Initialize();

        m_transStrenthenDialogIconList = m_myTransform.Find(m_widgetToFullName["StrenthenDialogIconList"]);

        m_dragCamera = m_myTransform.Find(m_widgetToFullName["StrenthenDialogIconListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0];
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].topLeft      = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
        m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].bottomRight  = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;

        m_dragableCamera            = m_dragCamera.GetComponentsInChildren <MyDragableCamera>(true)[0];
        m_dragableCamera.LeftArrow  = FindTransform("StrenthenDialogIconListArrowU").gameObject;
        m_dragableCamera.RightArrow = FindTransform("StrenthenDialogIconListArrowD").gameObject;

        m_bcStrenthUIBoxCollider = FindTransform("StrenthUIBoxCollider").GetComponentsInChildren <BoxCollider>(true)[0];

        //m_goStrenthenDialogStarRewardStarLevel = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogStarRewardStarLevel"]).gameObject;
        //m_goStarLevelListPosBegin = m_myTransform.FindChild(m_widgetToFullName["StarLevelListPosBegin"]).gameObject;
        //m_StrenthenStarLevelInfo = m_goStrenthenDialogStarRewardStarLevel.AddComponent<StrenthenStarLevelInfo>();
        //if (m_StrenthenStarLevelInfo != null)
        //    m_StrenthenStarLevelInfo.CreateStarLevelInfo(m_goStrenthenDialogStarRewardStarLevel.transform, m_goStarLevelListPosBegin.transform.localPosition);

        m_lblBaseEquipType  = m_myTransform.Find(m_widgetToFullName["BaseAttributeEquipTypeText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblStarLevel      = m_myTransform.Find(m_widgetToFullName["StarLevelText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseAttribute  = m_myTransform.Find(m_widgetToFullName["BaseAttributeText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblAfterAttribute = m_myTransform.Find(m_widgetToFullName["AfterAttributeText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblEquipmentLevel = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelNum"]).GetComponentsInChildren <UILabel>(true)[0];

        for (int i = 0; i < 10; i++)
        {
            m_arrStrenthLevelBG[i] = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelBG" + i]).gameObject;
            m_arrStrenthLevelBG[i].transform.localPosition = new Vector3(
                m_arrStrenthLevelBG[0].transform.localPosition.x + 53 * i,
                m_arrStrenthLevelBG[i].transform.localPosition.y,
                m_arrStrenthLevelBG[i].transform.localPosition.z);

            UIFilledSprite fs = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelFG" + i]).GetComponentsInChildren <UIFilledSprite>(true)[0];
            m_fsEquipmentExpList[i] = fs;
            m_fsEquipmentExpList[i].transform.localPosition = new Vector3(
                m_fsEquipmentExpList[0].transform.localPosition.x + 53 * i,
                m_fsEquipmentExpList[i].transform.localPosition.y,
                m_fsEquipmentExpList[i].transform.localPosition.z);
        }
        m_ssEquipmentImage = m_myTransform.Find(m_widgetToFullName["StrenthenDialogImgFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        m_lblBaseReward0Title         = FindTransform("LevelReward0BaseTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward1Title         = FindTransform("LevelReward1BaseTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward2Title         = FindTransform("LevelReward2BaseTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward0Num           = FindTransform("LevelReward0BaseNum").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward1Num           = FindTransform("LevelReward1BaseNum").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward2Num           = FindTransform("LevelReward2BaseNum").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward0TextAnimation = FindTransform("LevelReward0BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward1TextAnimation = FindTransform("LevelReward1BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0];
        m_lblBaseReward2TextAnimation = FindTransform("LevelReward2BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0];

        m_goLevelRewardAfter = FindTransform("GOLevelRewardAfter").gameObject;
        m_lblAfterReward0    = m_myTransform.Find(m_widgetToFullName["LevelReward0AfterText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblAfterReward1    = m_myTransform.Find(m_widgetToFullName["LevelReward1AfterText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblAfterReward2    = m_myTransform.Find(m_widgetToFullName["LevelReward2AfterText"]).GetComponentsInChildren <UILabel>(true)[0];

        // ǿ����ť
        m_goStrenthenDialogStrenth     = FindTransform("StrenthenDialogStrenth").gameObject;
        m_spStrenthenDialogStrenthBGUp = FindTransform("StrenthenDialogStrenthBGUp").GetComponentsInChildren <UISprite>(true)[0];

        m_lblNeedGold    = m_myTransform.Find(m_widgetToFullName["StrenthenDialogCostGold"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblCurrentGold = m_myTransform.Find(m_widgetToFullName["StrenthUICrrentGoldNum"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblNeedLevel   = m_myTransform.Find(m_widgetToFullName["StrenthenDialogNeedLevelText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblCost        = m_myTransform.Find(m_widgetToFullName["StrenthenDialogCostText"]).GetComponentsInChildren <UILabel>(true)[0];

        // ǿ����Ҫ�IJ���
        m_lblNeedMaterial1    = FindTransform("StrenthenDialogCostMaterial1").GetComponentsInChildren <UILabel>(true)[0];
        m_lblNeedMaterial2    = FindTransform("StrenthenDialogCostMaterial2").GetComponentsInChildren <UILabel>(true)[0];
        m_spNeedMaterialIcon1 = FindTransform("StrenthenDialogCostMaterial1Icon").GetComponentsInChildren <UISprite>(true)[0];
        m_spNeedMaterialIcon2 = FindTransform("StrenthenDialogCostMaterial2Icon").GetComponentsInChildren <UISprite>(true)[0];
        m_goNeedMaterial2     = FindTransform("GOStrenthenDialogCostMaterial2").gameObject;

        // ǿ����Ҫ�IJ��ϲ���,��ʾ��ָ����ť
        m_goGOMaterialObtainTip              = m_myTransform.Find(m_widgetToFullName["GOMaterialObtainTip"]).gameObject;
        m_goStrenthenDialogMaterialTip       = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTip"]).gameObject;
        m_spStrenthenDialogMaterialTipBGUp   = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTipBGUp"]).GetComponentsInChildren <UISprite>(true)[0];
        m_spStrenthenDialogMaterialTipBGDown = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTipBGDown"]).GetComponentsInChildren <UISprite>(true)[0];

        for (int i = 0; i < ICONGRIDNUM; ++i)
        {
            //obj = (GameObject)Instantiate(Resources.Load("GUI/StrenthenDialogIconGrid"));
            //obj.transform.parent = m_transStrenthenDialogIconList ;
            //obj.transform.localPosition = new Vector3(0,-ICONGRIDSPACE * i, 0);
            //obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 0.0008f);
            //obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;
            //obj.name = "EquipmentGrid"+i.ToString();
            //var s = m_transStrenthenDialogIconList.GetComponentsInChildren<MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
            //s.SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);
            //obj.AddComponent<StrenthenEquipmentGrid>().id = i;
            //m_listEquipmentGrid.Add(obj);

            int index = i;
            AssetCacheMgr.GetUIInstance("StrenthenDialogIconGrid.prefab", (prefab, guid, go) =>
            {
                GameObject obj              = (GameObject)go;
                obj.transform.parent        = m_transStrenthenDialogIconList;
                obj.transform.localPosition = new Vector3(0, ICONGRIDSPACE * index, 0);
                obj.transform.localScale    = new Vector3(0.0008f, 0.0008f, 1);
                obj.GetComponentsInChildren <MyDragCamera>(true)[0].RelatedCamera = m_dragCamera;
                obj.name = "EquipmentGrid" + index.ToString();
                var s    = m_transStrenthenDialogIconList.GetComponentsInChildren <MogoSingleButtonList>(true)[0] as MogoSingleButtonList;
                s.SingleButtonList.Add(obj.GetComponentsInChildren <MogoSingleButton>(true)[0]);
                obj.AddComponent <StrenthenEquipmentGrid>().id = index;

                Transform tranStarLevel = obj.transform.Find("StrenthenDialogIconGridStarLevelList");
                StrenthenStarLevelInfo strenthenStarLevelInfo = tranStarLevel.gameObject.AddComponent <StrenthenStarLevelInfo>();
                if (strenthenStarLevelInfo != null)
                {
                    strenthenStarLevelInfo.CreateStarLevelInfo(tranStarLevel, new Vector3(0, 0, 0));
                }

                m_listEquipmentGrid.Add(obj);

                ShowEquipmentUpSign(index, false);

                if (m_listEquipmentGrid.Count == ICONGRIDNUM)
                {
                    EquipmentUIViewManager.Instance.IsCanClick = true;
                    EventDispatcher.TriggerEvent(BodyEnhanceManager.ON_SHOW);

                    if (MogoUIManager.Instance.StrenthUILoaded != null)
                    {
                        MogoUIManager.Instance.StrenthUILoaded();
                    }

                    // ������ʽ��Ҫ����(��ҳ����Ҫ����)
                    if (!m_dragableCamera.IsMovePage)
                    {
                        m_dragableCamera.FPageHeight = ICONGRIDSPACE * ICON_GRID_ONE_PAGE;
                        m_dragableCamera.MAXY        = ICON_OFFSET_Y;
                        if (m_listEquipmentGrid.Count > ICON_GRID_ONE_PAGE)
                        {
                            m_dragableCamera.MINY = (m_listEquipmentGrid.Count - ICON_GRID_ONE_PAGE) * ICONGRIDSPACE + ICON_OFFSET_Y;
                        }
                        else
                        {
                            m_dragableCamera.MINY = m_dragableCamera.MAXY;
                        }
                    }

                    MogoGlobleUIManager.Instance.ShowWaitingTip(false);
                }

                if (index == 0)
                {
                    StrenthTabDown(index);
                }
                else
                {
                    StrenthTabUp(index);
                }
            });
        }
    }