mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
cf8368a946
修改_physics_process中的runningTime计算方式,乘以1000以毫秒为单位记录时间,提高时间精度
18 lines
347 B
GDScript
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
|