summaryrefslogtreecommitdiff
path: root/components/Level.gd
blob: 49886cdd30bb7a7219cf58b946cac0bb330181a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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():
	BackgroundMusic.lose_heart_sound()
	emit_signal("lost_heart", false)

func lose_all_hearts():
	BackgroundMusic.lose_heart_sound()
	emit_signal("lost_heart", true)

func finish_level():
	running = false
	emit_signal("level_finished")