inflict upon EVERYONE a bloody death!

This commit is contained in:
Haze Weathers 2023-01-16 02:08:35 -05:00
parent 2166d4443f
commit 18f5b28295
3 changed files with 46 additions and 2 deletions

View file

@ -1,5 +1,7 @@
extends Node2D
const DeathParticles = preload("res://objects/enemy/death_particles.tscn")
export var can_be_killed_by_sword = true
export var can_be_killed_by_arrow = true
export var can_be_squashed = true
@ -33,5 +35,11 @@ func _on_Area2D_area_entered(area):
die()
func die():
var death_particles = DeathParticles.instance()
death_particles.global_position = global_position
death_particles.emitting = true
get_parent().add_child(death_particles)
Game.play_sound(Game.a_die, Game.ac_die)
Game.score += score_for_killing
queue_free()