Ejemplo n.º 1
0
    private void CallBack(GameObj go, RttEntity.RttData data, UITexture texture)
    {
        RttEntity rtt = GetRTT();

        if (go != null)
        {
            rtt.Create(go.Go, data);
        }
        texture.mainTexture = rtt.MainTexture;
    }
Ejemplo n.º 2
0
    public void GreateRTT(UITexture texture, RttEntity.RttData data)
    {
        string name = (data.Res.Split('/')[data.Res.Split('/').Length - 1]).Replace(".unity3d", "");
        string path = data.Res;

        LBDownLoad.GameAssetsMgr.Instance.GetGameObjAsync(name, path, EResourceType.audio, delegate(GameObj obj)
        {
            CallBack(obj, data, texture);
        });
    }
Ejemplo n.º 3
0
    private void Initialize()
    {
        //Instantiate(Resources.Load("Prefabs/Player"), transform);
        //Instantiate(Resources.Load("Prefabs/Ground"), transform);
        //Instantiate(Resources.Load("Prefabs/Sausage"), transform);

        RttMgr.Instance.Init();
        GameAssetsMgr.Instance.Init();
        DownLoadMgr.Instance.Init();
        PoolMgr.Instance.Init();

        RttEntity.RttData data = new RttEntity.RttData();
        data.Width         = 500;
        data.Height        = 500;
        data.Res           = "file:///" + Application.streamingAssetsPath + "/" + "ruoshui.unity3d";
        data.Pos           = new Vector3(0.15f, -1.66f, 2.24f);
        data.Euler         = new Vector3(0, 180, 0);
        data.Scale         = Vector3.one;
        data.Anim          = "running";
        data.PlayAnimation = null;
        RttMgr.Instance.GreateRTT(_texture, data);
    }