CoWaitForSeconds() static private méthode

static private CoWaitForSeconds ( float sec, LuaFunction func ) : IEnumerator
sec float
func SLua.LuaFunction
Résultat IEnumerator
Exemple #1
0
    private static int WaitForSeconds(IntPtr L)
    {
        int result;

        try
        {
            float       sec  = (float)LuaDLL.luaL_checknumber(L, 1);
            LuaFunction func = ToLua.ToLuaFunction(L, 2);
            LuaCoroutine.mb.StartCoroutine(LuaCoroutine.CoWaitForSeconds(sec, func));
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }