feat(character): add animation state API (set/get_animation_state)

This commit is contained in:
Steven Wroblewski
2026-05-08 22:02:59 +02:00
parent 15ac8666f8
commit 9be67c8dfe
2 changed files with 45 additions and 0 deletions
+29
View File
@@ -44,3 +44,32 @@ func test_character_data_outfit_has_three_empty_slots() -> void:
assert_eq(_char.data.outfit[0], "")
assert_eq(_char.data.outfit[1], "")
assert_eq(_char.data.outfit[2], "")
func test_default_animation_state_is_idle() -> void:
assert_eq(_char.get_animation_state(), "idle")
func test_set_animation_state_sitting() -> void:
_char.set_animation_state("sitting")
assert_eq(_char.get_animation_state(), "sitting")
func test_set_animation_state_lying() -> void:
_char.set_animation_state("lying")
assert_eq(_char.get_animation_state(), "lying")
func test_set_animation_state_held() -> void:
_char.set_animation_state("held")
assert_eq(_char.get_animation_state(), "held")
func test_set_animation_state_happy() -> void:
_char.set_animation_state("happy")
assert_eq(_char.get_animation_state(), "happy")
func test_set_animation_state_sleeping() -> void:
_char.set_animation_state("sleeping")
assert_eq(_char.get_animation_state(), "sleeping")