famira greengit statusgit status

This commit is contained in:
Haze Weathers 2024-07-13 00:40:34 -04:00
parent 28fb9adf28
commit 2ed1969ba1
7 changed files with 58 additions and 1 deletions

View file

@ -5,7 +5,7 @@ signal died()
signal health_changed(amount)
const DeathParticles = preload("res://objects/enemy/death_particles.tscn")
const DeathParticles = preload("res://objects/enemy/death_particles_famira.tscn")
export var push_speed: float = 30.0
@ -152,5 +152,7 @@ func _on_Hitbox_area_entered(area: Area2D) -> void:
var death_particles = DeathParticles.instance()
death_particles.global_position = area.global_position
death_particles.emitting = true
death_particles.spray_scale = 2.0
death_particles.spray_ammount = 2
get_parent().add_child(death_particles)
area.queue_free()

View file

@ -7,6 +7,7 @@ const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
export var spray_ammount: int = 16
export var spray_velocity: float = 80
export var autoplay: bool = false
export var spray_scale: float = 1.0
func _ready() -> void:
@ -17,4 +18,5 @@ func _ready() -> void:
var spray = BloodSpray.instance()
spray.global_position = global_position
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
spray.scale = Vector2(spray_scale, spray_scale)
get_parent().add_child(spray)

View file

@ -0,0 +1,23 @@
extends CPUParticles2D
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
export var spray_ammount: int = 16
export var spray_velocity: float = 80
export var autoplay: bool = false
export var spray_scale: float = 1.0
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)
spray.scale = Vector2(spray_scale, spray_scale)
spray.color = Color(0x9ccd67ff)
get_parent().add_child(spray)

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