slimes are messy too

This commit is contained in:
Haze Weathers 2023-09-15 22:57:40 -04:00
parent bc079d58f2
commit b73ed13df3
2 changed files with 20 additions and 1 deletions

View 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)