Cambiados los aspectos visuales del juego a algo gotico

This commit is contained in:
Diego De la Viuda Llorente committed 2026-11-26 18:46:31 +01:00
1 parent ec7e35ddf6
commit 967b3a286d
205 files changed
+7056 -1630

No files matched your search

+7 -14
View File
@@ -1,18 +1,9 @@
extends CanvasLayer
## Controles táctiles provisionales para jugar en móvil.
##
## Los botones no llaman directamente al Player. En su lugar pulsan y liberan
## las mismas acciones del InputMap que ya usa el teclado. De esta forma la
## lógica de movimiento/combate sigue teniendo una única fuente de entrada:
##
## teclado -> InputMap <- controles táctiles
## |
## Player
##
## Cuando llegue el arte definitivo, esta escena puede cambiar por completo sin
## tocar player.gd mientras conserve estas seis acciones.
## La misma entrada del teclado, presentada como placas de metal tactiles.
## Se muestran en pantallas tactiles; el Inspector permite probarlas en escritorio.
@export var show_on_desktop: bool = false
@onready var move_left_button: Button = $Controls/MoveLeft
@onready var move_right_button: Button = $Controls/MoveRight
@@ -27,6 +18,7 @@ var _player: Node
## Asocia botones con las mismas acciones utilizadas por el teclado.
func _ready() -> void:
$Controls.visible = show_on_desktop or DisplayServer.is_touchscreen_available() or OS.has_feature("mobile")
_bind_button(jump_button, &"jump")
_bind_button(attack_button, &"attack")
_bind_button(ground_pound_button, &"ground_pound")
@@ -38,17 +30,18 @@ func _process(_delta: float) -> void:
if not is_instance_valid(_player):
_player = get_tree().get_first_node_in_group(&"player")
if not is_instance_valid(_player):
ground_pound_button.text = "GP"
ground_pound_button.text = "CAER"
ground_pound_button.modulate = Color.WHITE
return
var remaining: float = float(_player.get("ground_pound_cooldown_timer"))
ground_pound_button.text = "GP\n%ds" % ceili(remaining) if remaining > 0.0 else "GP"
ground_pound_button.text = "CAER\n%ds" % ceili(remaining) if remaining > 0.0 else "CAER"
ground_pound_button.modulate = Color(0.55, 0.55, 0.55, 0.85) if remaining > 0.0 else Color.WHITE
## Mantiene un unico dedo para direccion y permite deslizarlo entre ambos lados.
func _input(event: InputEvent) -> void:
if event is InputEventScreenTouch:
$Controls.show()
var touch := event as InputEventScreenTouch
if touch.pressed and direction_touch_index == -1:
var action := _direction_at(touch.position)