完善客户端功能并同步差距文档
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
extends SceneTree
|
||||
|
||||
const PlayerView = preload("res://ui/player_view.gd")
|
||||
const Audio = preload("res://audio.gd")
|
||||
|
||||
var _fail := 0
|
||||
|
||||
@@ -33,6 +34,17 @@ func _run() -> void:
|
||||
_ck(pv.build(assets, 0), "warrior PlayerView builds")
|
||||
if pv.anim == null:
|
||||
return
|
||||
await process_frame
|
||||
var body_mesh := pv.model.get_node_or_null("MeshInstance3D") as MeshInstance3D
|
||||
var body_layer := body_mesh.get_layer_mask() if body_mesh != null else 0
|
||||
_ck(body_mesh != null and body_layer == 2,
|
||||
"character mesh is assigned to the character light layer (got %d)" % body_layer)
|
||||
var audio: Node = Audio.new()
|
||||
get_root().add_child(audio)
|
||||
audio.setup(assets)
|
||||
pv.set_audio(audio)
|
||||
pv.set_anim_state("run")
|
||||
_ck(pv._sound_instances.size() == 3, "PlayerView run motion loads paired .mss instances")
|
||||
_ck(pv.set_motion_id(305), "clap motion resolves")
|
||||
_ck(String(pv.anim.get("anim_path")).ends_with("action/clap.msa"),
|
||||
"clap -> action/clap.msa")
|
||||
@@ -43,3 +55,4 @@ func _run() -> void:
|
||||
_ck(String(pv.anim.get("anim_path")).ends_with("action/slap_hurt.msa"),
|
||||
"slap hurt -> action/slap_hurt.msa")
|
||||
pv.queue_free()
|
||||
audio.queue_free()
|
||||
|
||||
Reference in New Issue
Block a user