Пример #1
0
    static int get_requesetInfo(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            AssetRequesetMsg  obj = (AssetRequesetMsg)o;
            AssetRequesetInfo ret = obj.requesetInfo;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index requesetInfo on a nil value" : e.Message));
        }
    }
Пример #2
0
    static int set_requesetInfo(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            AssetRequesetMsg  obj  = (AssetRequesetMsg)o;
            AssetRequesetInfo arg0 = (AssetRequesetInfo)ToLua.CheckObject(L, 2, typeof(AssetRequesetInfo));
            obj.requesetInfo = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index requesetInfo on a nil value" : e.Message));
        }
    }
Пример #3
0
    public BundleRequest(AssetRequesetInfo info, AssetBase mono, BundleRequesetBack callBack)
    {
        requesetCallBack  = new BundleRequesetBack(callBack);
        this.requesetInfo = info;
        bundleCount       = 0;

        this.assetBase = mono;


        //info.Debug();

        bundleNode = new BundleBackNode[info.bundles.Length];

        for (int i = 0; i < info.bundles.Length; i++)
        {
            BundleBackNode tmpBundle = new BundleBackNode(info.resSingle[i], info.scenceName, info.bundles[i], null, info.resNames[i]);

            tmpBundle.AddCallBack(ResLoadFinish);
            bundleNode[i] = tmpBundle;
        }
    }
Пример #4
0
    //for  lua
    public AssetRequesetMsg(ushort msgid, ushort backid, string scence, string[] bundle, string[] res, bool[] resSingle, int[] col)
    {
        //bool[][] resSingles = new bool[3][];

        //resSingles[0] = new bool[] { true, true };
        //resSingles[1] = new bool[] { true, true };

        //resSingles[2] = new bool[] { false };


        //Debug.Log("msgid==" + msgid);

        // Debug.Log("msgid=222=" + (int)AssetEvent.HunkMutiRes );
        this.msgId = msgid;

        string[][] resName = ChangeTwoArray <string>(res, bundle.Length, col);


        bool[][] resBool = ChangeTwoArray <bool>(resSingle, bundle.Length, col);



        requesetInfo = new AssetRequesetInfo(backid, scence, bundle, resName, resBool);
    }
Пример #5
0
    public void ChangeEventMsg(ushort msgid, ushort backid, string scence, string[] bundle, string[][] res, bool[][] resSingles)
    {
        this.msgId = msgid;

        requesetInfo = new AssetRequesetInfo(backid, scence, bundle, res, resSingles);
    }