forked from team-sg/hero-mark-2
What's that smell?
This commit is contained in:
parent
dde551db56
commit
8c818ac174
16 changed files with 99 additions and 2 deletions
16
objects/enemy/death_particles.gd
Normal file
16
objects/enemy/death_particles.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
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: RigidBody2D = BloodSpray.instance()
|
||||
spray.global_position = global_position
|
||||
spray.linear_velocity = Vector2(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/blood.png" type="Texture" id=1]
|
||||
[ext_resource path="res://objects/enemy/death_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 ]
|
||||
|
@ -26,3 +27,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