コード例 #1
0
 public void CreateTabItem()
 {
     uiTabBarItem = (UITabBarItem)GameObject.Instantiate(uiTabBarItemPrefab);
     uiTabBarItem.transform.parent = this.transform;
     uiTabBarItem.callbackClick    = OnUITabBarItemClick;
     UIViewController.ClonePrefabRectTransform(uiTabBarItemPrefab.gameObject, uiTabBarItem.gameObject);
 }
コード例 #2
0
 public void CreateUI()
 {
     ui = (UIComment)GameObject.Instantiate(uiPrefab);
     ui.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject);
     ui.callBackClick = OnUICommentDidClick;
 }
コード例 #3
0
 public void CreateUI()
 {
     uiGuanka            = (UIGuankaBase)GameObject.Instantiate(uiGuankaPrefab);
     uiGuanka.indexPlace = indexPlace;
     uiGuanka.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiGuankaPrefab.gameObject, uiGuanka.gameObject);
 }
コード例 #4
0
 public override void LayOutView()
 {
     base.LayOutView();
     Debug.Log("ScreenShotViewController LayOutView");
     if ((uiPrefab != null) && (ui != null))
     {
         UIViewController.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject);
     }
 }
コード例 #5
0
 public void CreateUI()
 {
     if (this.naviController != null)
     {
         this.naviController.HideNavibar(true);
     }
     uiSetting = (UISettingControllerBase)GameObject.Instantiate(uiSettingPrefab);
     uiSetting.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiSettingPrefab.gameObject, uiSetting.gameObject);
 }
コード例 #6
0
 public override void LayOutView()
 {
     base.LayOutView();
     Debug.Log("GameViewController LayOutView");
     if ((gameBasePrefab != null) && (_gameBase != null))
     {
         UIViewController.ClonePrefabRectTransform(gameBasePrefab.gameObject, _gameBase.gameObject);
         _gameBase.LayOut();
     }
 }
コード例 #7
0
 public void CreateUI()
 {
     if (this.naviController != null)
     {
         this.naviController.HideNavibar(true);
     }
     uiHome = (UIHomeBase)GameObject.Instantiate(uiHomePrefab);
     uiHome.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiHomePrefab.gameObject, uiHome.gameObject);
     uiHome.Init();
 }
コード例 #8
0
    public void CreateTabBar()
    {
        CreateContent();

        string     strPrefab = "Common/Prefab/TabBar/UITabBar";
        GameObject obj       = PrefabCache.main.Load(strPrefab);

        uiTabBarPrefab = obj.GetComponent <UITabBar>();

        uiTabBar = (UITabBar)GameObject.Instantiate(uiTabBarPrefab);
        uiTabBar.transform.parent = objController.transform;
        uiTabBar.callbackClick    = OnUITabBarClick;
        UIViewController.ClonePrefabRectTransform(uiTabBarPrefab.gameObject, uiTabBar.gameObject);
    }
コード例 #9
0
    void GotoGame(string name)
    {
        Debug.Log("GotoGame:" + name);
        _gameBase = (UIGameBase)GameObject.Instantiate(gameBasePrefab);
        //_gameBase.mainCamera = mainCamera;
        // _gameBaseRun.mainCamera = mainCamera;
        _gameBase.Init();
        _gameBase.SetController(this);
        UIViewController.ClonePrefabRectTransform(gameBasePrefab.gameObject, _gameBase.gameObject);

        RectTransform rctranParent = objController.transform.GetComponent <RectTransform>();

        RectTransform rctran = _gameBase.GetComponent <RectTransform>();
        float         x, y, w, h;
        float         adBannerHeight = 160f;

        adBannerHeight = 0;
        //poivt (0.5,0.5)
        // w = rctranParent.rect.width;
        // h = rctranParent.rect.height-adBannerHeight;
        // x = 0;
        // y = adBannerHeight/2;
        // rctran.sizeDelta = new Vector2(w,h);
        // rctran.anchoredPosition = new Vector2(x,y);

        // Vector2 pt = rctran.offsetMin;
        // pt.y = adBannerHeight;
        // if (gameType == AppType.NONGCHANG)
        // {
        //     pt.y = 0;
        // }
        // rctran.offsetMin = pt;

        AppSceneBase.main.UpdateMainWorldRect(adBannerHeight);

        //显示横幅广告
        AdKitCommon.main.InitAdBanner();
        if (EnableUIAdBanner())
        {
            uiAdBanner = (UIAdBanner)GameObject.Instantiate(uiAdBannerPrefab);
            uiAdBanner.SetViewParent(AppSceneBase.main.canvasMain.gameObject);
            UIViewController.ClonePrefabRectTransform(uiAdBannerPrefab.gameObject, uiAdBanner.gameObject);
        }


        ShowUserComment();
    }
コード例 #10
0
    public void CreateBar()
    {
        string     strPrefabCommon = "Common/Prefab/NaviBar/UINaviBar";
        string     strPrefabApp    = "App/Prefab/NaviBar/UINaviBar";
        GameObject obj             = (GameObject)PrefabCache.main.Load(strPrefabApp);

        if (obj == null)
        {
            obj = (GameObject)PrefabCache.main.Load(strPrefabCommon);
        }
        uiNaviBarPrefab = obj.GetComponent <UINaviBar>();

        //Debug.Log("rctranPrefab.offsetMin=" + rctranPrefab.offsetMin + " rctranPrefab.offsetMax=" + rctranPrefab.offsetMax);
        uiNaviBar = (UINaviBar)GameObject.Instantiate(uiNaviBarPrefab);
        uiNaviBar.transform.parent  = objController.transform;
        uiNaviBar.callbackBackClick = OnUINaviBarClickBack;
        UIViewController.ClonePrefabRectTransform(uiNaviBarPrefab.gameObject, uiNaviBar.gameObject);
        //Debug.Log("rctran.offsetMin=" + rctran.offsetMin + " rctran.offsetMax=" + rctran.offsetMax);
    }
コード例 #11
0
 public void CreateUI()
 {
     ui = (UIShotBase)GameObject.Instantiate(uiPrefab);
     ui.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject);
 }
コード例 #12
0
 public void CreateUI()
 {
     uiMoreApp = (UIMoreAppController)GameObject.Instantiate(uiMoreAppPrefab);
     uiMoreApp.SetController(this);
     UIViewController.ClonePrefabRectTransform(uiMoreAppPrefab.gameObject, uiMoreApp.gameObject);
 }