forked from team-sg/hero-mark-2
famira greengit statusgit status
This commit is contained in:
parent
28fb9adf28
commit
2ed1969ba1
7 changed files with 58 additions and 1 deletions
Binary file not shown.
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 4.8 KiB |
|
@ -5,7 +5,7 @@ signal died()
|
||||||
signal health_changed(amount)
|
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
|
export var push_speed: float = 30.0
|
||||||
|
@ -152,5 +152,7 @@ func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||||
var death_particles = DeathParticles.instance()
|
var death_particles = DeathParticles.instance()
|
||||||
death_particles.global_position = area.global_position
|
death_particles.global_position = area.global_position
|
||||||
death_particles.emitting = true
|
death_particles.emitting = true
|
||||||
|
death_particles.spray_scale = 2.0
|
||||||
|
death_particles.spray_ammount = 2
|
||||||
get_parent().add_child(death_particles)
|
get_parent().add_child(death_particles)
|
||||||
area.queue_free()
|
area.queue_free()
|
||||||
|
|
|
@ -7,6 +7,7 @@ const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||||
export var spray_ammount: int = 16
|
export var spray_ammount: int = 16
|
||||||
export var spray_velocity: float = 80
|
export var spray_velocity: float = 80
|
||||||
export var autoplay: bool = false
|
export var autoplay: bool = false
|
||||||
|
export var spray_scale: float = 1.0
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
@ -17,4 +18,5 @@ func _ready() -> void:
|
||||||
var spray = BloodSpray.instance()
|
var spray = BloodSpray.instance()
|
||||||
spray.global_position = global_position
|
spray.global_position = global_position
|
||||||
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
|
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
|
||||||
|
spray.scale = Vector2(spray_scale, spray_scale)
|
||||||
get_parent().add_child(spray)
|
get_parent().add_child(spray)
|
||||||
|
|
23
objects/enemy/death_particles_famira.gd
Normal file
23
objects/enemy/death_particles_famira.gd
Normal 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)
|
30
objects/enemy/death_particles_famira.tscn
Normal file
30
objects/enemy/death_particles_famira.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_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 )
|
Loading…
Add table
Add a link
Reference in a new issue