➕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:
+48
View File
@@ -132,3 +132,51 @@ theme_override_styles/pressed = SubResource("ButtonPressed")
icon = ExtResource("5_attack")
expand_icon = true
icon_max_width = 48
[node name="GroundPound" type="Button" parent="Controls"]
layout_mode = 0
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -264.0
offset_top = -200.0
offset_right = -154.0
offset_bottom = -100.0
grow_horizontal = 0
grow_vertical = 0
focus_mode = 0
keep_pressed_outside = true
theme_override_colors/font_color = Color(1, 1, 1, 0.95)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 18
theme_override_styles/normal = SubResource("ButtonNormal")
theme_override_styles/hover = SubResource("ButtonNormal")
theme_override_styles/pressed = SubResource("ButtonPressed")
text = "GP"
horizontal_alignment = 1
vertical_alignment = 1
[node name="SpecialAttack" type="Button" parent="Controls"]
layout_mode = 0
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -138.0
offset_top = -200.0
offset_right = -28.0
offset_bottom = -100.0
grow_horizontal = 0
grow_vertical = 0
focus_mode = 0
keep_pressed_outside = true
theme_override_colors/font_color = Color(1, 1, 1, 0.95)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 18
theme_override_styles/normal = SubResource("ButtonNormal")
theme_override_styles/hover = SubResource("ButtonNormal")
theme_override_styles/pressed = SubResource("ButtonPressed")
text = "SP"
horizontal_alignment = 1
vertical_alignment = 1