战斗结束输出单位剩余血量日志

wangzhenxing 2020-12-10 10:28:56 +09:00
parent 8289957799
commit f6ef3b3d3b
1 changed files with 19 additions and 0 deletions

View File

@ -321,6 +321,25 @@ end
-- 结束战斗
function this.EndBattle(result)
--前端
local hpList={}
table.insert(hpList," 我方1-6剩余血量:")
for i = 1, 6 do
local role=RoleManager.GetRole(0,i)
if role then
table.insert(hpList,role:GetRoleData(RoleDataName.Hp))
end
end
table.insert(hpList," 敌方1-6剩余血量:")
for i = 1, 6 do
local role=RoleManager.GetRole(1,i)
if role then
table.insert(hpList,role:GetRoleData(RoleDataName.Hp))
end
end
table.insert(hpList," 结果:")
table.insert(hpList,result)
LogWarn(BattleManager.PrintBattleTable(hpList))
-- 清空数据
this.Clear()
-- 判断结果