开始菜单、玩家选择、脸部绘制
This commit is contained in:
@@ -187,6 +187,21 @@ func test_animation_track_paths_resolve() -> void:
|
||||
)
|
||||
|
||||
|
||||
## 入口场景必须是开始菜单 —— 否则启动就直接落在世界里,还顶着 Net 那个调试面板。
|
||||
## 这条防的是「有人把 run/main_scene 改回世界」。
|
||||
func test_main_scene_is_the_menu() -> void:
|
||||
var configured := str(ProjectSettings.get_setting("application/run/main_scene", ""))
|
||||
assert_true(not configured.is_empty(), "project.godot 没设 application/run/main_scene")
|
||||
if configured.is_empty():
|
||||
return
|
||||
# 存的是 uid 也可能是 res:// 路径,两种都认
|
||||
var path := configured
|
||||
if configured.begins_with("uid://"):
|
||||
path = ResourceUID.get_id_path(ResourceUID.text_to_id(configured))
|
||||
assert_true(path.ends_with("ui/main_menu.tscn"),
|
||||
"入口场景是 %s,不是开始菜单 —— 启动会直接进世界" % path)
|
||||
|
||||
|
||||
## 片段在 AnimationPlayer 里按「库名/片段名」存(导入时每个 glb 各自成一个库),
|
||||
## 短名 has_animation() / get_animation() 一律查不到 —— 拿短名断言会假红,必须按库扫一遍。
|
||||
func _find_clip(anim_player: AnimationPlayer, clip: String) -> Animation:
|
||||
|
||||
Reference in New Issue
Block a user