♻️REFACTOR: Mejoras en la viabilidad para desarrollo

This commit is contained in:
Diego De la Viuda Llorente committed 2026-10-29 13:23:46 +01:00
1 parent 5aba6c7b47
commit fd0118d964
98 files changed
+5985 -3024

No files matched your search

+5 -5
View File
@@ -1,8 +1,8 @@
extends SceneTree
## Run after importing assets:
## Ejecutar despues de importar los recursos:
## godot --headless --path . --script res://tests/test_pixel_combat_runtime.gd
## Tests actual scene instantiation, pulse damage, death lifecycle and respawn.
## Comprueba instanciacion real, dano por pulsos, ciclo de muerte y reaparicion.
var _failures: int = 0
var _death_signals: int = 0
@@ -38,7 +38,7 @@ func _run() -> void:
_check(sprite.sprite_frames.get_frame_texture(animation, index) != null,
"Missing texture in " + str(animation))
# Keep positions fixed, so pulse falloff and screen clipping are deterministic.
# Mantener posiciones fijas para que la atenuacion y el recorte sean deterministas.
player.set_physics_process(false)
for node: Node in get_nodes_in_group("enemy"):
node.set_physics_process(false)
@@ -104,7 +104,7 @@ func _run() -> void:
_check(is_zero_approx(enemy_visual.rotation) and is_equal_approx(enemy_visual.self_modulate.a, 1.0),
"Respawn must restore the sprite transform and opacity")
# Shape query uses the new landing position, with combat shapes restored.
# La consulta de forma usa la posicion de aterrizaje y las colisiones restauradas.
enemy.global_position = player.global_position + Vector2(30, 0)
enemy.set("max_health", 50)
enemy.set("current_health", 50)
@@ -115,7 +115,7 @@ func _run() -> void:
player.call("_ground_pound_impact")
_check(int(enemy.get("current_health")) == 38, "High ground pound must deal exactly 12 damage")
# Exercise effect processing/cleanup, not just resource loading.
# Probar el procesamiento y la limpieza de efectos, no solo la carga de recursos.
await create_timer(0.8).timeout
if _failures == 0:
print("OK PIXEL COMBAT: animations, solo pulses, recoil, death, rewards, respawn and ground pound")