HeartBeast/assets/World/Grass.gd

11 lines
332 B
GDScript3
Raw Normal View History

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()