示例#1
0
 static public int min(IntPtr l)
 {
     try {
         XIntKeyPool self = (XIntKeyPool)checkSelf(l);
         self.min();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#2
0
 static public int createPool_s(IntPtr l)
 {
     try {
         System.String a1;
         checkType(l, 1, out a1);
         var ret = XIntKeyPool.createPool(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#3
0
 static public int getObj(IntPtr l)
 {
     try {
         XIntKeyPool  self = (XIntKeyPool)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.getObj(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#4
0
 static public int delObj(IntPtr l)
 {
     try {
         XIntKeyPool        self = (XIntKeyPool)checkSelf(l);
         UnityEngine.Object a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.delObj(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#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);
    }