skeleton proper death sound, better bone particles
This commit is contained in:
parent
30d7e84a46
commit
b1beffd97b
10 changed files with 46 additions and 10 deletions
|
@ -17,6 +17,9 @@ const DeathParticles = preload("res://objects/enemy/death_particles.tscn")
|
|||
#export var can_be_squashed = true
|
||||
|
||||
export var score_for_killing = 0
|
||||
export var blood = true
|
||||
|
||||
var death_sound = Game.a_die
|
||||
|
||||
func _on_Hitbox_area_entered(area):
|
||||
#Kill player
|
||||
|
@ -24,11 +27,12 @@ func _on_Hitbox_area_entered(area):
|
|||
area.get_parent().die()
|
||||
|
||||
func die():
|
||||
var death_particles = DeathParticles.instance()
|
||||
death_particles.global_position = global_position
|
||||
death_particles.emitting = true
|
||||
get_parent().add_child(death_particles)
|
||||
if blood:
|
||||
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.play_sound(death_sound, Game.ac_die)
|
||||
Game.score += score_for_killing
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue