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

feat(组件管理): 重构组件加载逻辑并添加优先级函数

重构ComponentManager的get方法,使用MathTool.priority函数实现资源加载的优先级逻辑
将Wave类中的entity类型从PackedScene改为String,延迟加载角色资源
添加MathTool.priority静态方法用于处理空值情况
This commit is contained in:
2025-09-21 14:47:43 +08:00
parent 4a66a1754e
commit 84d286e2c5
3 changed files with 29 additions and 25 deletions
+2
View File
@@ -34,3 +34,5 @@ static func getClosestIntersection(a: Vector2, b: Vector2, r: float) -> Vector2:
return b
var intersection = a + abNormalized * r
return intersection
static func priority(a, b):
return a if a else b