Enemy Death Effect Added

This commit is contained in:
Alan Youngblood
2024-11-17 17:34:31 -05:00
parent 6555ebe4c2
commit 656c3278a4
16 changed files with 91 additions and 33 deletions

View File

@ -1,16 +1,16 @@
extends Node2D
const GrassEffect = preload("res://Effects/GrassEffect.tscn")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func create_grass_effect():
var GrassEffect = load("res://Effects/GrassEffect.tscn")
#var GrassEffect = load("res://Effects/GrassEffect.tscn")
var grassEffect = GrassEffect.instance()
var world = get_tree().current_scene
world.add_child(grassEffect)
# var world = get_tree().current_scene
get_parent().add_child(grassEffect)
grassEffect.global_position = global_position
func _on_Hurtbox_area_entered(area):