mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 16:01:53 +08:00
refactor(资源加载): 将preload替换为load以优化内存使用
统一使用load方法动态加载资源,减少启动时的内存占用 移动Manager类到Tools/Managers目录下 修复DirTool处理remap文件的问题
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
extends Node2D
|
||||
class_name WorldManager
|
||||
|
||||
static var rootNode: Node2D
|
||||
static var tree: SceneTree
|
||||
static var runningTime: int = 0
|
||||
|
||||
func _ready():
|
||||
tree = get_tree()
|
||||
rootNode = self
|
||||
func _physics_process(delta):
|
||||
runningTime += delta * 1000
|
||||
if EntityBase.mobCount() == 0 and runningTime > 3000:
|
||||
UIState.setPanel("MakeFeed")
|
||||
|
||||
static func getTime():
|
||||
return runningTime
|
||||
Reference in New Issue
Block a user