示例#1
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);
    }