added objective, added boss

This commit is contained in:
2021-12-05 03:26:09 -06:00
parent db6cec47b4
commit eb0ec1287f
27 changed files with 945 additions and 60 deletions

View File

@@ -1,6 +1,24 @@
extends Node2D
var gems: int = 4
func _ready() -> void:
#$YSort/Player.position = get_viewport_rect().size / 2
$YSort/Player.load_hud($HUD)
return
func _on_TreasureChest_gem_collected() -> void:
gems -= 1
if gems == 0:
$YSort/Items/Door/doorClosed.visible = false
$YSort/Items/Door/doorOpened.visible = true
$DoorCollision.layers = 5
func _on_NextArea_area_entered(area: Area2D) -> void:
if area.get_parent().name == 'Player':
$YSort/Player.position.x = 195
$YSort/Player.position.y = -335