summaryrefslogtreecommitdiff
path: root/Scripts/Level Specific/DeathZone.gd
blob: 0648c279e8bc8fc0f81a203ef3f850859412d6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
extends Area2D

var timer : Timer

func _ready() -> void:
	monitoring = false
	timer = Timer.new()
	timer.wait_time = 1
	timer.timeout.connect(_enable)
	add_child(timer)
	timer.one_shot = true
	timer.start()

func _on_body_entered(body:Node2D) -> void:
	if body is Entity:
		body.damage(1000000)
		monitoring = false

func _enable():
	monitoring = true