Beispiel #1
0
    public static EffectRenderObjManager Instance()
    {
        if (_inst == null)
        {
            _inst = new EffectRenderObjManager();
        }

        return(_inst);
    }
Beispiel #2
0
    public void dispose()
    {
        _dead = true;
        //外派事件销毁...
        loop       = 1;
        isStopedEf = false;
//         _overJudge.Clear();
//         _LinkerList.Clear();
        EffectRenderObjManager.Instance().RemoveRenderobj(this);
    }
Beispiel #3
0
 public void clear()
 {
     for (int i = 0; i < freeList.Count; i++)
     {
         if (freeList[i] != null)
         {
             EffectRenderObjManager.Instance().RemoveRenderobj(freeList[i], false);
             freeList[i].Release();
         }
     }
     freeList.Clear();
 }
Beispiel #4
0
 static int Instance(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         EffectRenderObjManager o = EffectRenderObjManager.Instance();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #5
0
 static int Release(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         EffectRenderObjManager obj = (EffectRenderObjManager)ToLua.CheckObject(L, 1, typeof(EffectRenderObjManager));
         obj.Release();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #6
0
 static int ClearPool(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         EffectRenderObjManager obj = (EffectRenderObjManager)ToLua.CheckObject(L, 1, typeof(EffectRenderObjManager));
         bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.ClearPool(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #7
0
 static int Update(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         EffectRenderObjManager obj = (EffectRenderObjManager)ToLua.CheckObject(L, 1, typeof(EffectRenderObjManager));
         float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.Update(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #8
0
 static int RemoveRenderobj(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         EffectRenderObjManager obj  = (EffectRenderObjManager)ToLua.CheckObject(L, 1, typeof(EffectRenderObjManager));
         EffectRenderObj        arg0 = (EffectRenderObj)ToLua.CheckObject(L, 2, typeof(EffectRenderObj));
         bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
         obj.RemoveRenderobj(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #9
0
    static int set_effectPool(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            EffectRenderObjManager obj  = (EffectRenderObjManager)o;
            EffectPool             arg0 = (EffectPool)ToLua.CheckObject(L, 2, typeof(EffectPool));
            obj.effectPool = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index effectPool on a nil value" : e.Message));
        }
    }
Beispiel #10
0
    static int get_effectPool(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            EffectRenderObjManager obj = (EffectRenderObjManager)o;
            EffectPool             ret = obj.effectPool;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index effectPool on a nil value" : e.Message));
        }
    }
Beispiel #11
0
 static int CreateRenderObj(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         EffectRenderObjManager obj = (EffectRenderObjManager)ToLua.CheckObject(L, 1, typeof(EffectRenderObjManager));
         string          arg0       = ToLua.CheckString(L, 2);
         string          arg1       = ToLua.CheckString(L, 3);
         bool            arg2       = LuaDLL.luaL_checkboolean(L, 4);
         EffectRenderObj o          = obj.CreateRenderObj(ref arg0, ref arg1, arg2);
         ToLua.PushObject(L, o);
         LuaDLL.lua_pushstring(L, arg0);
         LuaDLL.lua_pushstring(L, arg1);
         return(3);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #12
0
    static int _CreateEffectRenderObjManager(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                EffectRenderObjManager obj = new EffectRenderObjManager();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: EffectRenderObjManager.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #13
0
 public void Release()
 {
     ClearPool(true);
     _inst = null;
 }