コード例 #1
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);
    }
コード例 #2
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);

    }