
extends Area2D

export (int, "finish_level_enter", "kill_trigger_enter", "clinging_artea_enter", "ladder_zone_enter", "show_dialog") var event = 0
export (bool)var kill_enemy

func _on_event_area_body_enter( body ):
	print (event)
	if body == Globals.get("PLAYER"):
		if event == 0:
			print("level complete")
			global.finish_level_event()
		if event == 1:
			print("game over")
			body.die()
	elif event == 1 and kill_enemy and body.has_method("die"):
		body.die()

func _ready():
	pass