Пример #1
0
 static public int BeginLoad(IntPtr l)
 {
     try {
         CTransport self = (CTransport)checkSelf(l);
         CRequest   a1;
         checkType(l, 2, out a1);
         self.BeginLoad(a1);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Пример #2
0
    protected bool LoadRequest(CRequest req)
    {
        string     key  = req.udKey;
        CTransport load = this.GetFreeLoader(); // new GameObject();

        if (load != null)
        {
            req.times++;
            load.key    = key;
            loader[key] = req;
            //#if UNITY_EDITOR
            //                      Debug.Log ("-----------beginLoad <<:" + req.key + ">>  shared=" + req.isShared + ",currentLoading=" + this.currentLoading + "  max=" + this.maxLoading);
            //#endif
            load.BeginLoad(req);
            return(true);
        }
        else
        {
#if UNITY_EDITOR
            //Debug.Log ("-----------no free transport <<:" + req.key + ">>  shared=" + req.isShared + ",currentLoading=" + this.currentLoading + "  max=" + this.maxLoading);
#endif
        }
        return(false);
    }