forked from team-sg/hero-mark-2
famira greengit statusgit status
This commit is contained in:
parent
28fb9adf28
commit
2ed1969ba1
7 changed files with 58 additions and 1 deletions
23
objects/enemy/death_particles_famira.gd
Normal file
23
objects/enemy/death_particles_famira.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
extends CPUParticles2D
|
||||
|
||||
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||
|
||||
|
||||
export var spray_ammount: int = 16
|
||||
export var spray_velocity: float = 80
|
||||
export var autoplay: bool = false
|
||||
export var spray_scale: float = 1.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if autoplay:
|
||||
emitting = true
|
||||
yield(get_tree(), "idle_frame")
|
||||
for i in spray_ammount:
|
||||
var spray = BloodSpray.instance()
|
||||
spray.global_position = global_position
|
||||
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
|
||||
spray.scale = Vector2(spray_scale, spray_scale)
|
||||
spray.color = Color(0x9ccd67ff)
|
||||
get_parent().add_child(spray)
|
Loading…
Add table
Add a link
Reference in a new issue