Win, lose screen. Game version info. Matador a lot more aggressive/wins easier (tweaks needed). No more score/combo/waves
This commit is contained in:
@@ -47,11 +47,23 @@ func _run() -> void:
|
||||
root.add_child(scene_inst)
|
||||
current_scene = scene_inst # match runtime: game code (sword throw, overlays) uses current_scene
|
||||
|
||||
# The matadors now stab the (idle) player; drop the HUD so a resulting player
|
||||
# death doesn't raise the game-over screen and pause the tree mid-measurement.
|
||||
var hud := _find_hud(scene_inst)
|
||||
if hud != null:
|
||||
hud.queue_free()
|
||||
|
||||
await create_timer(WARMUP_SEC).timeout
|
||||
|
||||
var matadors := get_nodes_in_group(&"matador")
|
||||
print(" matadors alive: %d" % matadors.size())
|
||||
|
||||
# The mass-ragdoll below kills every matador; hold the spawner's alive count high
|
||||
# so that doesn't trip the win screen (which pauses the tree) mid-measurement.
|
||||
var spawners := get_nodes_in_group(&"matador_spawn")
|
||||
if not spawners.is_empty():
|
||||
spawners[0]._alive = 100000
|
||||
|
||||
var normal := await _sample_frames(SAMPLE_FRAMES)
|
||||
_report_phase("normal play", normal)
|
||||
|
||||
@@ -99,6 +111,16 @@ func _report_phase(label: String, sample: Array) -> void:
|
||||
"%s: peak %.2f ms under %.0f ms budget" % [label, max_ms, MAX_BUDGET_MS])
|
||||
|
||||
|
||||
func _find_hud(n: Node) -> Node:
|
||||
if n is CanvasLayer and n.has_method(&"_show_game_over"):
|
||||
return n
|
||||
for c: Node in n.get_children():
|
||||
var r := _find_hud(c)
|
||||
if r != null:
|
||||
return r
|
||||
return null
|
||||
|
||||
|
||||
func _assert_true(condition: bool, desc: String) -> void:
|
||||
if condition:
|
||||
_passed += 1
|
||||
|
||||
Reference in New Issue
Block a user