Trying to add new enemy

This commit is contained in:
Jasmine
2021-12-04 17:54:29 -06:00
parent 1e8a8a15f8
commit 5a3ae103f5
20 changed files with 865 additions and 120 deletions

View File

@@ -1,6 +1,7 @@
extends Area2D
onready var portal = get_node("../PortalDarkForest")
onready var shape = portal.get_child(0)
# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
@@ -8,7 +9,7 @@ extends Area2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
self.visible = false
shape.set_deferred("disabled",true)
# Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -16,5 +17,5 @@ func _ready() -> void:
# pass
func _on_Area2D_body_entered(body: Node) -> void:
self.visible = true
func _on_ChestDetection_body_entered(body: Node) -> void:
shape.set_deferred("disabled",false)