11 lines
332 B
GDScript3
11 lines
332 B
GDScript3
|
extends Sprite
|
||
|
onready var GrassEffect = load("res://assets/Effects/GrassEffect.tscn")
|
||
|
func destroyGrass():
|
||
|
var grassEffect = GrassEffect.instance()
|
||
|
var world = get_tree().current_scene
|
||
|
world.add_child(grassEffect)
|
||
|
grassEffect.global_position = global_position
|
||
|
queue_free()
|
||
|
func _on_Hurtbox_area_entered(area):
|
||
|
destroyGrass()
|