Example #1
0
 static public int setDestroy(IntPtr l)
 {
     try {
         XGOStrKeyPool self = (XGOStrKeyPool)checkSelf(l);
         XGOStrKeyPool.XPoolObjDestroy a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         self.setDestroy(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #2
0
 static public int createPool_s(IntPtr l)
 {
     try {
         System.String a1;
         checkType(l, 1, out a1);
         var ret = XGOStrKeyPool.createPool(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
 static public int isWrong(IntPtr l)
 {
     try {
         XGOStrKeyPool self = (XGOStrKeyPool)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         var ret = self.isWrong(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #4
0
 static public int delgo(IntPtr l)
 {
     try {
         XGOStrKeyPool          self = (XGOStrKeyPool)checkSelf(l);
         UnityEngine.GameObject a1;
         checkType(l, 2, out a1);
         System.String a2;
         checkType(l, 3, out a2);
         self.delgo(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #5
0
    public XPool getPool(string str, XPoolType tp)
    {
        if (_pools.ContainsKey(str))
        {
            if (tp != _pools[str].PoolType)
            {
                XDebug.LogError("!!注意!!2次获取的同名pool类型不一样" + str);
            }
            return(_pools[str]);
        }

        XPool pool = null;

        if (tp == XPoolType.SINGLE)
        {
            pool = XSinglePool.createPool(str);
        }
        else if (tp == XPoolType.INTKEY)
        {
            pool = XIntKeyPool.createPool(str);
        }
        else if (tp == XPoolType.STRKEY)
        {
            pool = XStrKeyPool.createPool(str);
        }
        else if (tp == XPoolType.GOSINGLE)
        {
            pool = XGOSinglePool.createPool(str);
        }
        else if (tp == XPoolType.GOINTKEY)
        {
            pool = XGOIntKeyPool.createPool(str);
        }
        else if (tp == XPoolType.GOSTRKEY)
        {
            pool = XGOStrKeyPool.createPool(str);
        }

        if (pool != null)
        {
            pool.transform.SetParent(this.transform);
            _pools.Add(str, pool);
        }

        return(pool);
    }
Example #6
0
 static public int setRealCreate(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(string)))
         {
             XGOStrKeyPool self = (XGOStrKeyPool)checkSelf(l);
             System.String a1;
             checkType(l, 2, out a1);
             self.setRealCreate(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(UnityEngine.GameObject)))
         {
             XGOStrKeyPool          self = (XGOStrKeyPool)checkSelf(l);
             UnityEngine.GameObject a1;
             checkType(l, 2, out a1);
             self.setRealCreate(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(XGOStrKeyPool.XPoolRealCreate)))
         {
             XGOStrKeyPool self = (XGOStrKeyPool)checkSelf(l);
             XGOStrKeyPool.XPoolRealCreate a1;
             LuaDelegation.checkDelegate(l, 2, out a1);
             self.setRealCreate(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function setRealCreate to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }