PC2: Basic visible player character representation + local movement controller #49

Merged
reviewer-bot merged 10 commits from agent/9bfb90314053 into main 2026-08-21 00:41:53 +00:00
Showing only changes of commit 8118f3074b - Show all commits
+5 -5
View File
@@ -25,21 +25,21 @@ func _run() -> void:
await process_frame await process_frame
# 1. Verify the player node exists in the scene tree. # 1. Verify the player node exists in the scene tree.
var player := level.get_node("Player") var player: CharacterBody3D = level.get_node("Player") as CharacterBody3D
_check("Player node exists in test level", player != null) _check("Player node exists in test level", player != null)
_check("Player is a CharacterBody3D", player is CharacterBody3D) _check("Player is a CharacterBody3D", player is CharacterBody3D)
# 2. Verify the player has the expected child structure. # 2. Verify the player has the expected child structure.
var collision := player.get_node("CollisionShape3D") var collision: CollisionShape3D = player.get_node("CollisionShape3D") as CollisionShape3D
_check("Player has CollisionShape3D", collision != null) _check("Player has CollisionShape3D", collision != null)
_check("CollisionShape3D has a shape", collision.shape != null) _check("CollisionShape3D has a shape", collision.shape != null)
var mesh := player.get_node("CapsuleMesh") var mesh: MeshInstance3D = player.get_node("CapsuleMesh") as MeshInstance3D
_check("Player has CapsuleMesh", mesh != null) _check("Player has CapsuleMesh", mesh != null)
_check("CapsuleMesh has a mesh", mesh.mesh != null) _check("CapsuleMesh has a mesh", mesh.mesh != null)
# 3. Verify the player spawned at the PlayerSpawn marker position. # 3. Verify the player spawned at the PlayerSpawn marker position.
var spawn_marker: Marker3D = level.get_node("PlayerSpawn") var spawn_marker: Marker3D = level.get_node("PlayerSpawn") as Marker3D
_check("PlayerSpawn marker exists", spawn_marker != null) _check("PlayerSpawn marker exists", spawn_marker != null)
# The player's _ready() should have moved it to the spawn marker's # The player's _ready() should have moved it to the spawn marker's
@@ -50,7 +50,7 @@ func _run() -> void:
player.global_position == expected_pos) player.global_position == expected_pos)
# 4. Verify the player script class_name is correct. # 4. Verify the player script class_name is correct.
var script := player.get_script() var script: GDScript = player.get_script() as GDScript
_check("Player has a script attached", script != null) _check("Player has a script attached", script != null)
_check("Player script is Player class", script is GDScript) _check("Player script is Player class", script is GDScript)