forked from team-sg/hero-mark-2
buncha bullshit
This commit is contained in:
parent
0fa8ab9930
commit
0cfe581493
8 changed files with 175 additions and 0 deletions
20
objects/enemy/death_particles_big.gd
Normal file
20
objects/enemy/death_particles_big.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
extends CPUParticles2D
|
||||
|
||||
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray_big.tscn")
|
||||
|
||||
|
||||
export var spray_ammount: int = 1
|
||||
export var spray_velocity: float = 120
|
||||
export var autoplay: bool = false
|
||||
|
||||
|
||||
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 / 45))
|
||||
get_parent().add_child(spray)
|
30
objects/enemy/death_particles_big.tscn
Normal file
30
objects/enemy/death_particles_big.tscn
Normal file
|
@ -0,0 +1,30 @@
|
|||
[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_big.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 ]
|
||||
|
||||
[node name="DeathSplatter" type="CPUParticles2D"]
|
||||
emitting = false
|
||||
amount = 32
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
explosiveness = 0.9
|
||||
local_coords = false
|
||||
texture = ExtResource( 1 )
|
||||
emission_shape = 2
|
||||
emission_rect_extents = Vector2( 4, 4 )
|
||||
direction = Vector2( 0, -1 )
|
||||
spread = 180.0
|
||||
gravity = Vector2( 0, 50 )
|
||||
initial_velocity = 60.0
|
||||
initial_velocity_random = 0.9
|
||||
damping = 2.0
|
||||
angle = 720.0
|
||||
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