mejoras en jugabilidad
This commit is contained in:
1 parent
d983bc2e69
commit
ec7e35ddf6
40 files changed
+856
-538
No files matched your search
@@ -22,6 +22,7 @@ extends CanvasLayer
|
||||
@onready var special_attack_button: Button = $Controls/SpecialAttack
|
||||
|
||||
var direction_touch_index: int = -1
|
||||
var _player: Node
|
||||
|
||||
|
||||
## Asocia botones con las mismas acciones utilizadas por el teclado.
|
||||
@@ -32,6 +33,19 @@ func _ready() -> void:
|
||||
_bind_button(special_attack_button, &"special_attack")
|
||||
|
||||
|
||||
## Indica el enfriamiento del golpe aereo sin alterar la entrada del resto de botones.
|
||||
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.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.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:
|
||||
|
||||
Reference in new issue
Block a user