Implemented additional audio for mirror from Maggie; fixed shader flash
on damage from hitting glass shards.
This commit is contained in:
parent
78472ee95c
commit
004e1063b8
9 changed files with 69 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="Shader" uid="uid://x02irwg8ynvp" path="res://shaders/pixel_highlight.gdshader" id="1_d4l8f"]
|
[ext_resource type="Shader" uid="uid://x02irwg8ynvp" path="res://shaders/pixel_highlight.gdshader" id="1_d4l8f"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cklakjbjislch" path="res://sprites/table.png" id="1_kcy6j"]
|
[ext_resource type="Texture2D" uid="uid://cklakjbjislch" path="res://sprites/table.png" id="1_kcy6j"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cs4pq5u144agp" path="res://sounds/MIRROR_SHATTER.wav" id="3_twce5"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_twce5"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_twce5"]
|
||||||
shader = ExtResource("1_d4l8f")
|
shader = ExtResource("1_d4l8f")
|
||||||
|
|
@ -25,3 +26,7 @@ hframes = 2
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=982140641]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=982140641]
|
||||||
shape = SubResource("RectangleShape2D_d4l8f")
|
shape = SubResource("RectangleShape2D_d4l8f")
|
||||||
|
|
||||||
|
[node name="MirrorShatter" type="AudioStreamPlayer2D" parent="." unique_id=1479442361]
|
||||||
|
stream = ExtResource("3_twce5")
|
||||||
|
volume_db = -13.178
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ func _on_player_died():
|
||||||
EventBus.goose_talk.emit(3)
|
EventBus.goose_talk.emit(3)
|
||||||
instance.queue_free()
|
instance.queue_free()
|
||||||
game_over.show()
|
game_over.show()
|
||||||
|
$LevelAudio.stop()
|
||||||
await get_tree().create_timer(2).timeout
|
await get_tree().create_timer(2).timeout
|
||||||
game_over.hide()
|
game_over.hide()
|
||||||
$CanvasLayer/Title.show()
|
$CanvasLayer/Title.show()
|
||||||
|
|
@ -126,6 +127,9 @@ func new_game():
|
||||||
playing = true
|
playing = true
|
||||||
print("New game started!")
|
print("New game started!")
|
||||||
|
|
||||||
|
# Play Level Music
|
||||||
|
$LevelAudio.play()
|
||||||
|
|
||||||
|
|
||||||
func _input(EventInput):
|
func _input(EventInput):
|
||||||
if EventInput.is_action_pressed("shoot") and playing == false:
|
if EventInput.is_action_pressed("shoot") and playing == false:
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://cd1kwb8klcsb5" path="res://scenes/goose.tscn" id="9_85g3d"]
|
[ext_resource type="PackedScene" uid="uid://cd1kwb8klcsb5" path="res://scenes/goose.tscn" id="9_85g3d"]
|
||||||
[ext_resource type="AudioStream" uid="uid://c3e8sdfqcikp6" path="res://sounds/welcome.wav" id="10_choun"]
|
[ext_resource type="AudioStream" uid="uid://c3e8sdfqcikp6" path="res://sounds/welcome.wav" id="10_choun"]
|
||||||
[ext_resource type="PackedScene" uid="uid://drf1k1iulvy6f" path="res://scenes/wave.tscn" id="11_ya4ey"]
|
[ext_resource type="PackedScene" uid="uid://drf1k1iulvy6f" path="res://scenes/wave.tscn" id="11_ya4ey"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://c4rr5yd22wmof" path="res://sounds/Ambient 1.0.wav" id="12_trceg"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_1bvp3"]
|
[sub_resource type="Animation" id="Animation_1bvp3"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
|
|
@ -136,6 +137,10 @@ position = Vector2(118, 162)
|
||||||
stream = ExtResource("10_choun")
|
stream = ExtResource("10_choun")
|
||||||
volume_db = -0.5
|
volume_db = -0.5
|
||||||
|
|
||||||
|
[node name="LevelAudio" type="AudioStreamPlayer2D" parent="." unique_id=2125260365]
|
||||||
|
stream = ExtResource("12_trceg")
|
||||||
|
volume_db = -13.178
|
||||||
|
|
||||||
[node name="Wave" parent="." unique_id=2117861058 instance=ExtResource("11_ya4ey")]
|
[node name="Wave" parent="." unique_id=2117861058 instance=ExtResource("11_ya4ey")]
|
||||||
|
|
||||||
[connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]
|
[connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -116,13 +116,13 @@ func _on_gun_cooldown_timeout() -> void:
|
||||||
func _on_area_entered(area):
|
func _on_area_entered(area):
|
||||||
if area.is_in_group("enemies"):
|
if area.is_in_group("enemies"):
|
||||||
shield -= int(max_shield / 2)
|
shield -= int(max_shield / 2)
|
||||||
# damage_taken.emit()
|
_on_damage_taken()
|
||||||
area.hit_detection()
|
area.hit_detection()
|
||||||
if area.is_in_group("enemy_bullets") and self.monitoring == true:
|
if area.is_in_group("enemy_bullets") and self.monitoring == true:
|
||||||
damage_taken.emit()
|
damage_taken.emit()
|
||||||
|
|
||||||
if area.is_in_group("shards"):
|
#if area.is_in_group("shards"):
|
||||||
shield -= int(max_shield / 2)
|
# shield -= int(max_shield / 2)
|
||||||
|
|
||||||
func _on_damage_taken():
|
func _on_damage_taken():
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,10 @@ func spawn_enemies():
|
||||||
add_child(t)
|
add_child(t)
|
||||||
t.position = Vector2(screensize.x / 2, position.y + 125)
|
t.position = Vector2(screensize.x / 2, position.y + 125)
|
||||||
await get_tree().create_timer(1.5).timeout
|
await get_tree().create_timer(1.5).timeout
|
||||||
var ts = t.get_child(0)
|
var ts = t.get_child(2)
|
||||||
|
await get_tree().create_timer(.9).timeout
|
||||||
|
ts.play()
|
||||||
|
ts = t.get_child(0)
|
||||||
ts.frame = 1
|
ts.frame = 1
|
||||||
EventBus.flash_screen.emit(.25)
|
EventBus.flash_screen.emit(.25)
|
||||||
await get_tree().create_timer(1.5).timeout
|
await get_tree().create_timer(1.5).timeout
|
||||||
|
|
|
||||||
BIN
sounds/Ambient 1.0.wav
Normal file
BIN
sounds/Ambient 1.0.wav
Normal file
Binary file not shown.
24
sounds/Ambient 1.0.wav.import
Normal file
24
sounds/Ambient 1.0.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://c4rr5yd22wmof"
|
||||||
|
path="res://.godot/imported/Ambient 1.0.wav-7eb74b277d0ccdf0e9132ce95904b256.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://sounds/Ambient 1.0.wav"
|
||||||
|
dest_files=["res://.godot/imported/Ambient 1.0.wav-7eb74b277d0ccdf0e9132ce95904b256.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=2
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=2
|
||||||
BIN
sounds/MIRROR_SHATTER.wav
Normal file
BIN
sounds/MIRROR_SHATTER.wav
Normal file
Binary file not shown.
24
sounds/MIRROR_SHATTER.wav.import
Normal file
24
sounds/MIRROR_SHATTER.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://cs4pq5u144agp"
|
||||||
|
path="res://.godot/imported/MIRROR_SHATTER.wav-6a9b05ad677ea7d6108bac87600f3937.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://sounds/MIRROR_SHATTER.wav"
|
||||||
|
dest_files=["res://.godot/imported/MIRROR_SHATTER.wav-6a9b05ad677ea7d6108bac87600f3937.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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue