Пример #1
0
    void Awake()
    {
        m_myTransform = transform;

        m_instance = m_myTransform.GetComponentsInChildren <AssistantUIViewManager>(true)[0];

        Initialize();

        FillFullNameData(m_myTransform);

        Camera cam = GameObject.Find("Camera").GetComponentInChildren <Camera>();

        m_myTransform.GetChild(0).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.GetChild(1).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.GetChild(2).GetComponentsInChildren <UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.Find(m_widgetToFullName["AssistantUISkillContractGridListCamera"]).GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = cam;
        m_myTransform.Find(m_widgetToFullName["AssistantUIMintmarkGridListCamera"]).GetComponentsInChildren <UIViewport>(true)[0].sourceCamera      = cam;

        m_goElementMintmarkTip = m_myTransform.Find(m_widgetToFullName["ElementMintmarkTip"]).gameObject;
        MintmarkGridTip        = new AssistantUIMintmarkGridTip(m_goElementMintmarkTip);

        m_goSkillsContractGrowTip = m_myTransform.Find(m_widgetToFullName["SkillsContractGrowTip"]).gameObject;
        SkillGrowTip = new AssistantUISkillGrowTip(m_goSkillsContractGrowTip);

        m_goSkillsContractTip = m_myTransform.Find(m_widgetToFullName["SkillsContractTip"]).gameObject;
        SkillGridTip          = new AssistantUISkillGridTip(m_goSkillsContractTip);

        m_goElementMintmarkGrowTip = m_myTransform.Find(m_widgetToFullName["ElementMintmarkGrowTip"]).gameObject;
        MintmarkGrowTip            = new AssistantUIMintmarkGrowTip(m_goElementMintmarkGrowTip);

        m_goSkillsContractSkillList = m_myTransform.Find(m_widgetToFullName["AssistantUISkillsContractGridList"]).gameObject;
        m_goElementMintmarkList     = m_myTransform.Find(m_widgetToFullName["AssistantUIElementMintmarkGridList"]).gameObject;

        m_vec3AssistantUIIconListStartPos     = m_myTransform.Find(m_widgetToFullName["AssistantUIGridIconListStartPos"]).transform.localPosition;
        m_camAssistantUISkillContractGridList = m_myTransform.Find(m_widgetToFullName["AssistantUISkillContractGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];
        m_camAssistantUIMintMarkGridList      = m_myTransform.Find(m_widgetToFullName["AssistantUIMintmarkGridListCamera"]).GetComponentsInChildren <Camera>(true)[0];

        m_goGlobleDialogMask = m_myTransform.Find(m_widgetToFullName["GlobleDialogBG"]).gameObject;

        m_lblSkillsContractMoney = m_myTransform.Find(m_widgetToFullName["SkillsContractGrowTipMoneyText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblSkillsContractLevel = m_myTransform.Find(m_widgetToFullName["SkillsContractGrowTipLevel"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblSkillsContractCost  = m_myTransform.Find(m_widgetToFullName["SkillsContractGrowTipCostNum"]).GetComponentsInChildren <UILabel>(true)[0];

        m_lblElementMintmarkMoney = m_myTransform.Find(m_widgetToFullName["ElementMintmarkGrowTipMoneyText"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblElementMintmarkLevel = m_myTransform.Find(m_widgetToFullName["ElementMintmarkGrowTipLevel"]).GetComponentsInChildren <UILabel>(true)[0];
        m_lblElementMintmarkCost  = m_myTransform.Find(m_widgetToFullName["ElementMintmarkGrowTipCostNum"]).GetComponentsInChildren <UILabel>(true)[0];

        m_goSkillsContractPassive0  = m_myTransform.Find(m_widgetToFullName["SkillsContractPassive0"]).GetComponentsInChildren <AssistantUIButton>(true)[0];
        m_goSkillsContractPassive1  = m_myTransform.Find(m_widgetToFullName["SkillsContractPassive1"]).GetComponentsInChildren <AssistantUIButton>(true)[0];
        m_goSkillsContractInitative = m_myTransform.Find(m_widgetToFullName["SkillsContractInitative"]).GetComponentsInChildren <AssistantUIButton>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            m_goMintmarkBodyGrid[i] = m_myTransform.Find(m_widgetToFullName["ElementMintmarkElement" + i]).GetComponentsInChildren <AssistantUIButton>(true)[0];
        }

        m_goRTTModelTopLeft     = m_myTransform.Find(m_widgetToFullName["AssistantModelRTTopLeft"]).gameObject;
        m_goRTTModelBottomRight = m_myTransform.Find(m_widgetToFullName["AssistantModelRTBottomRight"]).gameObject;

        AddAssistantModel(AssistantUIModelName);

        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");

        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
    }
Пример #2
0
    void Awake()
    {

        m_myTransform = transform;

        m_instance = m_myTransform.GetComponentsInChildren<AssistantUIViewManager>(true)[0];

        Initialize();

        FillFullNameData(m_myTransform);

        Camera cam = GameObject.Find("Camera").GetComponentInChildren<Camera>();
        m_myTransform.GetChild(0).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.GetChild(1).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.GetChild(2).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["AssistantUISkillContractGridListCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = cam;
        m_myTransform.FindChild(m_widgetToFullName["AssistantUIMintmarkGridListCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = cam;

        m_goElementMintmarkTip = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkTip"]).gameObject;
        MintmarkGridTip = new AssistantUIMintmarkGridTip(m_goElementMintmarkTip);

        m_goSkillsContractGrowTip = m_myTransform.FindChild(m_widgetToFullName["SkillsContractGrowTip"]).gameObject;
        SkillGrowTip = new AssistantUISkillGrowTip(m_goSkillsContractGrowTip);

        m_goSkillsContractTip = m_myTransform.FindChild(m_widgetToFullName["SkillsContractTip"]).gameObject;
        SkillGridTip = new AssistantUISkillGridTip(m_goSkillsContractTip);

        m_goElementMintmarkGrowTip = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkGrowTip"]).gameObject;
        MintmarkGrowTip = new AssistantUIMintmarkGrowTip(m_goElementMintmarkGrowTip);

        m_goSkillsContractSkillList = m_myTransform.FindChild(m_widgetToFullName["AssistantUISkillsContractGridList"]).gameObject;
        m_goElementMintmarkList = m_myTransform.FindChild(m_widgetToFullName["AssistantUIElementMintmarkGridList"]).gameObject;

        m_vec3AssistantUIIconListStartPos = m_myTransform.FindChild(m_widgetToFullName["AssistantUIGridIconListStartPos"]).transform.localPosition;
        m_camAssistantUISkillContractGridList = m_myTransform.FindChild(m_widgetToFullName["AssistantUISkillContractGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
        m_camAssistantUIMintMarkGridList = m_myTransform.FindChild(m_widgetToFullName["AssistantUIMintmarkGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];

        m_goGlobleDialogMask = m_myTransform.FindChild(m_widgetToFullName["GlobleDialogBG"]).gameObject;

        m_lblSkillsContractMoney = m_myTransform.FindChild(m_widgetToFullName["SkillsContractGrowTipMoneyText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblSkillsContractLevel = m_myTransform.FindChild(m_widgetToFullName["SkillsContractGrowTipLevel"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblSkillsContractCost = m_myTransform.FindChild(m_widgetToFullName["SkillsContractGrowTipCostNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_lblElementMintmarkMoney = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkGrowTipMoneyText"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblElementMintmarkLevel = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkGrowTipLevel"]).GetComponentsInChildren<UILabel>(true)[0];
        m_lblElementMintmarkCost = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkGrowTipCostNum"]).GetComponentsInChildren<UILabel>(true)[0];

        m_goSkillsContractPassive0 = m_myTransform.FindChild(m_widgetToFullName["SkillsContractPassive0"]).GetComponentsInChildren<AssistantUIButton>(true)[0];
        m_goSkillsContractPassive1 = m_myTransform.FindChild(m_widgetToFullName["SkillsContractPassive1"]).GetComponentsInChildren<AssistantUIButton>(true)[0];
        m_goSkillsContractInitative = m_myTransform.FindChild(m_widgetToFullName["SkillsContractInitative"]).GetComponentsInChildren<AssistantUIButton>(true)[0];

        for (int i = 0; i < 5; ++i)
        {
            m_goMintmarkBodyGrid[i] = m_myTransform.FindChild(m_widgetToFullName["ElementMintmarkElement" + i]).GetComponentsInChildren<AssistantUIButton>(true)[0];
        }

        m_goRTTModelTopLeft = m_myTransform.FindChild(m_widgetToFullName["AssistantModelRTTopLeft"]).gameObject;
        m_goRTTModelBottomRight = m_myTransform.FindChild(m_widgetToFullName["AssistantModelRTBottomRight"]).gameObject;

        AddAssistantModel(AssistantUIModelName);

        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");
        AddSkillContractGrid(true, "jl_keyinsuipian");
        AddSkillContractGrid(false, "jl_keyinsuipian");

        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");
        AddElementMintmarkGrid("jl_keyinsuipian");

        
    }