Added blood splash
This commit is contained in:
@@ -48,14 +48,14 @@ collision_layer = 64
|
||||
collision_mask = 33
|
||||
script = ExtResource("1_ah13v")
|
||||
|
||||
[node name="WaterSplash" parent="." unique_id=658940825 instance=ExtResource("2_go1hq")]
|
||||
position = Vector2(0, -14)
|
||||
|
||||
[node name="CultistSprite" parent="." unique_id=1997264413 instance=ExtResource("3_mbt3t")]
|
||||
material = SubResource("ShaderMaterial_ah13v")
|
||||
position = Vector2(0, 1)
|
||||
texture = SubResource("ViewportTexture_go1hq")
|
||||
|
||||
[node name="WaterSplash" parent="." unique_id=658940825 instance=ExtResource("2_go1hq")]
|
||||
position = Vector2(0, -14)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=185651284]
|
||||
position = Vector2(0, 2)
|
||||
shape = SubResource("CapsuleShape2D_mocsw")
|
||||
@@ -110,6 +110,7 @@ collision_mask = 161
|
||||
|
||||
[node name="KillingArea" parent="." unique_id=1891922549 instance=ExtResource("5_500rx")]
|
||||
collision_mask = 128
|
||||
type = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="KillingArea" unique_id=1710758452]
|
||||
position = Vector2(0, 2)
|
||||
|
||||
@@ -24,9 +24,10 @@ var _is_switching_needed := false
|
||||
|
||||
|
||||
@onready var camera : Camera2D = $Camera2D
|
||||
@onready var water_splash : GPUParticles2D = $WaterSplash
|
||||
@onready var sprite : AnimatedSprite2D = $PlayerSprite
|
||||
@onready var particles : GPUParticles2D = $GPUParticles2D
|
||||
@onready var water_splash : GPUParticles2D = $WaterSplash
|
||||
@onready var blood_splash : GPUParticles2D = $BloodSplash
|
||||
@onready var switch_effect : GPUParticles2D = $SwitchEffect
|
||||
@onready var collision_switcher : CollisionSwitcher = $CollisionSwitcher
|
||||
@onready var pickups : Node2D = $Pickups
|
||||
|
||||
@@ -95,11 +96,11 @@ func _input(event: InputEvent) -> void:
|
||||
|
||||
|
||||
func _switch() -> void:
|
||||
if center_area.get_overlapping_bodies().size() == 0 and not particles.emitting:
|
||||
if center_area.get_overlapping_bodies().size() == 0 and not switch_effect.emitting:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_switch, global_position)
|
||||
collision_switcher.switch_color()
|
||||
switch_buffer_timer.stop()
|
||||
particles.restart()
|
||||
switch_effect.restart()
|
||||
_is_switching_needed = false
|
||||
|
||||
|
||||
@@ -108,6 +109,9 @@ func kill(type := KillingArea.Type.None) -> void:
|
||||
KillingArea.Type.Water:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_splash, global_position)
|
||||
water_splash.restart()
|
||||
KillingArea.Type.Cultist:
|
||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_blood, global_position)
|
||||
blood_splash.restart()
|
||||
is_dead = true
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,16 @@
|
||||
[ext_resource type="Script" uid="uid://cmimnl6jf78ao" path="res://game/characters/player/state_machine/falling_left_state.gd" id="14_2lnxg"]
|
||||
[ext_resource type="Script" uid="uid://5s7ko6pcqagy" path="res://game/characters/player/state_machine/falling_right_state.gd" id="15_bfpdl"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_bhunq"]
|
||||
lifetime_randomness = 0.5
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
spread = 15.0
|
||||
initial_velocity_min = -25.0
|
||||
initial_velocity_max = 25.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_bfpdl"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 3
|
||||
@@ -40,13 +50,22 @@ collision_layer = 128
|
||||
collision_mask = 33
|
||||
script = ExtResource("1_xln5q")
|
||||
|
||||
[node name="WaterSplash" parent="." unique_id=658940825 instance=ExtResource("2_eeksw")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="PlayerSprite" parent="." unique_id=237719081 instance=ExtResource("2_n6ad3")]
|
||||
animation = &"jump_right"
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="." unique_id=405618377]
|
||||
[node name="WaterSplash" parent="." unique_id=658940825 instance=ExtResource("2_eeksw")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="BloodSplash" type="GPUParticles2D" parent="." unique_id=218762198]
|
||||
position = Vector2(0, -4)
|
||||
emitting = false
|
||||
amount = 32
|
||||
one_shot = true
|
||||
preprocess = 0.2
|
||||
explosiveness = 1.0
|
||||
process_material = SubResource("ParticleProcessMaterial_bhunq")
|
||||
|
||||
[node name="SwitchEffect" type="GPUParticles2D" parent="." unique_id=405618377]
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 0.25
|
||||
|
||||
Reference in New Issue
Block a user