mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
9d9217da2c
- 对旁观和重连进行优化,减轻服务器CPU负担 - 加强Lua与C++交互能力,现在可以直接传const QVariant &参数 - 借助上一条,删除了客户端侧代码绝大多数冗余的json.encode/JSON.parse - 微调swig代码减少生成量,将int映射到lua integer而不是number
23 lines
520 B
Lua
23 lines
520 B
Lua
-- SPDX-License-Identifier: GPL-3.0-or-later
|
||
-- 暂且用来当client.lua用了,别在意
|
||
|
||
---@class fk.Client
|
||
---@field callback fun(s: fk.Client, c: string, j: string, r: boolean)
|
||
local C = {}
|
||
|
||
function C:replyToServer(c, j) end
|
||
function C:notifyServer(c, j) end
|
||
function C:addPlayer(id, name, avatar) end
|
||
function C:removePlayer(id) end
|
||
function C:changeSelf(id) end
|
||
function C:saveRecord(j, fname) end
|
||
|
||
fk.ClientInstance = C
|
||
|
||
---@class fk.QmlBackend
|
||
local B = {}
|
||
|
||
function B:emitNotifyUI(c, j) end
|
||
|
||
fk.Backend = B
|