1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/WorldManager.gd
T
fallingshrimp cf8368a946 perf: 将运行时间计算从秒改为毫秒
修改_physics_process中的runningTime计算方式,乘以1000以毫秒为单位记录时间,提高时间精度
2025-08-29 10:30:20 +08:00

18 lines
347 B
GDScript

extends Node2D
class_name WorldManager
static var rootNode: Node2D
static var tree: SceneTree
static var runningTime: float = 0
func _ready():
tree = get_tree()
rootNode = self
func _physics_process(delta):
runningTime += delta * 1000
if EntityBase.mobCount() == 0:
UIState.setPanel("MakeFeed")
static func getTime():
return runningTime