Added locked barriers and a new ghost enemy

This commit is contained in:
VoidTwo
2021-12-04 18:23:05 -06:00
parent fcea3cee03
commit 9101bf2f65
21 changed files with 472 additions and 41 deletions

View File

@@ -0,0 +1,23 @@
extends StaticBody2D
export var alignment: String = 'V'
func _ready() -> void:
if not alignment in ['V', 'H']:
print('Silver Barrier rotation needs to be "V" or "H"')
elif alignment == 'H':
rotation_degrees = 90
return
func _on_unlock_body_entered(body: Node) -> void:
if not 'player' in body.get_groups():
return
if body.has_item('Silver Key'):
body.remove_item('Silver Key')
$Sprite.animation = 'open'
$Collision.set_deferred('disabled', true)
$Unlock.set_deferred('monitoring', false)
return