1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-13 07:07:12 +08:00

feat(工具类): 添加百分比转换工具并重构游戏规则数值

在MathTool中添加percent方法用于百分比转换
重构GameRule中所有百分比相关数值,使用MathTool.percent方法
将itemShowStayTime重命名为itemShowLifetime以更准确表达用途
This commit is contained in:
2025-08-28 15:03:12 +08:00
parent aa1b13752a
commit ec3251ec9d
3 changed files with 15 additions and 13 deletions
+2
View File
@@ -11,3 +11,5 @@ static func randc_from(array: Array):
return array[randi() % array.size()]
static func signBeforeStr(value: float):
return ("+" if value > 0 else "-" if value < 0 else "") + str(abs(value))
static func percent(value: float):
return value / 100