extends "res://Levels/Level.gd"

onready var Boss = $BossEnemy
onready var DoorLock = $DoorLock
onready var Trigger = $Trigger

const PLAYER_BIT = 0

func set_door_lock(value):
	DoorLock.visible = value
	DoorLock.set_collision_mask_bit(PLAYER_BIT, value)

func _on_Trigger_triggered():
	set_door_lock(true)

func _on_BossEnemy_died():
	set_door_lock(false)
