forked from team-sg/hero-mark-2
slimes are messy too
This commit is contained in:
parent
bc079d58f2
commit
b73ed13df3
2 changed files with 20 additions and 1 deletions
17
objects/enemy/slime_particles.gd
Normal file
17
objects/enemy/slime_particles.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
extends CPUParticles2D
|
||||
|
||||
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||
|
||||
|
||||
export var spray_ammount: int = 16
|
||||
export var spray_velocity: float = 80
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for i in spray_ammount:
|
||||
var spray = BloodSpray.instance()
|
||||
spray.global_position = global_position
|
||||
spray.color = Color(0xa05ef2ff)
|
||||
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
|
||||
get_parent().add_child(spray)
|
Loading…
Add table
Add a link
Reference in a new issue