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
|
||||
|
||||
@@ -38,6 +38,7 @@ const MUSIC_BUS = "Music"
|
||||
@export var sfx_stream_player_lost : AudioStream
|
||||
@export var sfx_stream_player_spoted : AudioStream
|
||||
@export var sfx_stream_splash : AudioStream
|
||||
@export var sfx_stream_blood : AudioStream
|
||||
@export var sfx_stream_switch : AudioStream
|
||||
|
||||
@export_group("Music Streams", "music_stream")
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://ckmpft46wjgqs" path="res://sound/music/main_menu.wav" id="17_g6nb7"]
|
||||
[ext_resource type="AudioStream" uid="uid://ttemdy7avyh7" path="res://sound/music/gameplay.wav" id="17_l5yxe"]
|
||||
[ext_resource type="AudioStream" uid="uid://ckykxq8ugds41" path="res://sound/sfx/splash.wav" id="18_4cvue"]
|
||||
[ext_resource type="AudioStream" uid="uid://b18trj54c3x4e" path="res://sound/sfx/blood.wav" id="19_yvugr"]
|
||||
|
||||
[node name="SoundManager" type="Node" unique_id=1917953940]
|
||||
process_mode = 3
|
||||
@@ -48,6 +49,7 @@ sfx_stream_lever = ExtResource("15_3d1ws")
|
||||
sfx_stream_player_lost = ExtResource("8_6ll5c")
|
||||
sfx_stream_player_spoted = ExtResource("9_q7cyi")
|
||||
sfx_stream_splash = ExtResource("18_4cvue")
|
||||
sfx_stream_blood = ExtResource("19_yvugr")
|
||||
sfx_stream_switch = ExtResource("7_ab171")
|
||||
music_stream_gameplay = ExtResource("17_l5yxe")
|
||||
music_stream_main_menu = ExtResource("17_g6nb7")
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://b18trj54c3x4e"
|
||||
path="res://.godot/imported/blood.wav-a720c8613456412468c305c9df3d93d1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/sfx/blood.wav"
|
||||
dest_files=["res://.godot/imported/blood.wav-a720c8613456412468c305c9df3d93d1.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Reference in New Issue
Block a user