1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
extends Node2D class_name Level signal lost_heart(instakill) signal level_finished() var running = false func start(): print("Level ", name, " starting.") running = true func lose_heart(): emit_signal("lost_heart", false) func lose_all_hearts(): emit_signal("lost_heart", true) func finish_level(): running = false emit_signal("level_finished")