X-Git-Url: http://git.purplebirdman.com/frog-ninja.git/blobdiff_plain/9fac9f2c3ccbba52e1e450f5b9dde7a52336fa57..0b4b7dc3e7a9507f7b7c87e9cf0f606e051927f2:/player/moves/Move.gd?ds=inline diff --git a/player/moves/Move.gd b/player/moves/Move.gd index c914e9e..d98363a 100644 --- a/player/moves/Move.gd +++ b/player/moves/Move.gd @@ -5,6 +5,8 @@ class_name Move # flags and variables here var player: Player var camera: Camera3D +@export var state_name: String + # enums are prioritized by order of list static var moves_priority: Dictionary = { @@ -14,6 +16,8 @@ static var moves_priority: Dictionary = { "shoot": 3, "dash": 50, "fall": 100, + "fallToLanding": 101, + "fallToRoll": 102, } static func moves_priority_sort(a: String, b: String): @@ -23,9 +27,9 @@ static func moves_priority_sort(a: String, b: String): func should_enter(input: InputPacket) -> String: if not player.is_on_floor(): - input.actions.append("fall") - input.actions.sort_custom(moves_priority_sort) - return input.actions[0] + input.player_actions.append("fall") + input.player_actions.sort_custom(moves_priority_sort) + return input.player_actions[0] func update(_input: InputPacket, _delta: float): @@ -38,3 +42,11 @@ func on_enter_state(): func on_exit_state(): pass + + +func _on_animation_started(_animation_name: String): + pass + + +func _on_animation_finished(_animation_name: String): + pass