Added underscore to unpublic functions names

This commit is contained in:
2024-09-09 14:53:32 +03:00
parent 5581aed215
commit 18b9c4a63e
3 changed files with 41 additions and 42 deletions
+10 -10
View File
@@ -26,15 +26,10 @@ var ANIMATIONS_BY_STATE : Dictionary = {
func _ready() -> void:
play_animation()
func highlight() -> void:
state = PickupState.HIGHLIGHTING
play_animation()
_play_animation()
func play_animation() -> void:
func _play_animation() -> void:
var animation : String
if state == PickupState.PREPARING:
animation = ANIMATIONS_BY_STATE[state]
@@ -50,10 +45,15 @@ func _on_animated_sprite_2d_animation_finished() -> void:
match state:
PickupState.PREPARING:
state = PickupState.SHOWING_UP
play_animation()
_play_animation()
PickupState.SHOWING_UP:
state = PickupState.IDLING
play_animation()
_play_animation()
PickupState.HIGHLIGHTING:
state = PickupState.IDLING
play_animation()
_play_animation()
func highlight() -> void:
state = PickupState.HIGHLIGHTING
_play_animation()