薛之猫大王
2026-02-22 35593fff68c76413ce82a918e56f127355bf6c55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local M = {}
 
-- ---------------------------------------------------------
-- 启动HUD更新循环(本地客户端)
-- ---------------------------------------------------------
function M.start()
    clicli.ltimer.loop(0.5, function()
        clicli.player.with_local(function(local_player)
            M.update_local_hud(local_player)
        end)
    end, 'HUD更新')
end
 
function M.update_local_hud(local_player)
    local PlayerMgr = require 'core.player_manager'
    local all = PlayerMgr.get_all_player_units()
 
    for _, pd in pairs(all) do
        if pd.player == local_player then
            local sus = pd.unit:storage_get('suspicion') or 0
            -- TODO: 通过 LocalUILogic 更新怀疑值条
            -- TODO: 更新物品栏显示
            -- TODO: 更新剩余时间
            break
        end
    end
end
 
return M