mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat: 新增角色系统及基础功能实现
新增HCN、Lynx和MuyangDog三个可玩角色及其相关资源 实现角色选择界面和角色属性系统 重构玩家生成逻辑以支持角色选择 优化角色卡片UI显示效果
This commit is contained in:
@@ -7,16 +7,16 @@ var speedScale: float = 1
|
||||
func _init(cd: float = 100):
|
||||
cooldown = cd
|
||||
|
||||
func centralTime():
|
||||
func centralTime() -> float:
|
||||
return cooldown / speedScale
|
||||
func isCooldowned():
|
||||
func isCooldowned() -> bool:
|
||||
return timeSinceLastStart() >= centralTime()
|
||||
func start():
|
||||
func start() -> bool:
|
||||
var state = isCooldowned()
|
||||
if state:
|
||||
lastStart = WorldManager.getTime()
|
||||
return state
|
||||
func timeSinceLastStart():
|
||||
func timeSinceLastStart() -> float:
|
||||
return WorldManager.getTime() - lastStart
|
||||
func percent():
|
||||
func percent() -> float:
|
||||
return timeSinceLastStart() / centralTime()
|
||||
|
||||
Reference in New Issue
Block a user