Esempio n. 1
0
    private static int SetRoleJump(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 2);
            RoleAction roleAction = (RoleAction)ToLua.CheckObject(L, 1, typeof(RoleAction));
            int        roleJump   = (int)LuaDLL.luaL_checknumber(L, 2);
            int        n          = roleAction.SetRoleJump(roleJump);
            LuaDLL.lua_pushinteger(L, n);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }