forked from team-sg/hero-mark-2
splash particlesgit status
This commit is contained in:
parent
002737706b
commit
bd12aa68c1
9 changed files with 87 additions and 4 deletions
|
@ -7,6 +7,7 @@ signal teleport_finished()
|
|||
# CONSTANTS #
|
||||
const ArrowProjectile = preload("res://objects/player/arrow_projectile.tscn")
|
||||
const DeathSplatter = preload("res://objects/player/player_death_particles.tscn")
|
||||
const SplashParticles = preload("res://objects/environment/splash/splash_particles.tscn")
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||
|
||||
# EXPORTS #
|
||||
|
@ -490,6 +491,12 @@ func _on_Hitbox_body_entered(body: Node) -> void:
|
|||
if body.is_in_group("death"):
|
||||
if body.is_in_group("no_blood"):
|
||||
skip_blood = true
|
||||
if body.is_in_group("has_splash"):
|
||||
var particles = SplashParticles.instance()
|
||||
particles.global_position = death_splatter_position.global_position
|
||||
particles.color = body.splash_color
|
||||
particles.emitting = true
|
||||
get_parent().add_child(particles)
|
||||
die()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue