➕ADD: botones para los ataques especiales

This commit is contained in:
Diego De la Viuda Llorente committed 2026-10-16 12:47:27 +02:00
1 parent 18b0fae498
commit cf42886682
2 files changed
+54

No files matched your search

+6
View File
@@ -18,6 +18,8 @@ extends CanvasLayer
@onready var move_right_button: Button = $Controls/MoveRight
@onready var jump_button: Button = $Controls/Jump
@onready var attack_button: Button = $Controls/Attack
@onready var ground_pound_button: Button = $Controls/GroundPound
@onready var special_attack_button: Button = $Controls/SpecialAttack
var direction_touch_index: int = -1
@@ -25,6 +27,8 @@ var direction_touch_index: int = -1
func _ready() -> void:
_bind_button(jump_button, &"jump")
_bind_button(attack_button, &"attack")
_bind_button(ground_pound_button, &"ground_pound")
_bind_button(special_attack_button, &"special_attack")
func _input(event: InputEvent) -> void:
@@ -53,6 +57,8 @@ func _exit_tree() -> void:
Input.action_release(&"move_right")
Input.action_release(&"jump")
Input.action_release(&"attack")
Input.action_release(&"ground_pound")
Input.action_release(&"special_attack")
func _direction_at(position: Vector2) -> StringName: