コード例 #1
0
    // Use this for initialization
    void Start()
    {
        Application.targetFrameRate = 60;

        //Stage.inst.onKeyDown.Add(OnKeyDown);

        ResourceManager.Instance.SepDownloadURL     = GameUtil.SepPath + "/StreamingAssets";
        ResourceManager.Instance.UpdateDownloadURL  = GameUtil.AssetRoot + "/StreamingAssets";
        ResourceManager.Instance.BaseDownloadingURL = GameUtil.BaseStreamAssetPath + "/res_base/StreamingAssets";
        ResourceManager.Instance.BundleExt          = ".assetbundle";
        ResourceManager.Instance.LoadBundle("assets/arts/fairygui/login", (AssetBundle ab) =>
        {
            Debug.Log(ab);

            UIPackage.AddPackage(ab);

            _mainView = UIPackage.CreateObject("Login", "Main").asCom;
            _mainView.fairyBatching = true;
            _mainView.SetSize(GRoot.inst.width, GRoot.inst.height);
            _mainView.AddRelation(GRoot.inst, RelationType.Size);

            GRoot.inst.AddChild(_mainView);
            //_mainView.GetTransition("t0").Play();
            GObject p      = FGUIHelper.Find(_mainView, "n4/n8");
            GButton button = p.asButton;
            Debug.Log(button);
            button.onClick.Add(() =>
            {
                Debug.Log("Click Me");
            });
        });
    }
コード例 #2
0
ファイル: FGUIWindow.cs プロジェクト: mengtest/PokeGame
 public GObject Find(string name)
 {
     return(FGUIHelper.Find(this.contentPane, name));
 }