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)
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/particles/slime.png" type="Texture" id=1]
|
||||
[ext_resource path="res://objects/enemy/slime_particles.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Curve" id=43]
|
||||
_data = [ Vector2( 0, 1 ), 0.0, -0.113537, 0, 0, Vector2( 1, 0 ), -3.35032, 0.0, 0, 0 ]
|
||||
|
@ -27,3 +28,4 @@ angle_random = 1.0
|
|||
scale_amount = 0.5
|
||||
scale_amount_random = 1.0
|
||||
scale_amount_curve = SubResource( 43 )
|
||||
script = ExtResource( 2 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue