Implemented most sounds (Missing Boss and Hero Laught))

This commit is contained in:
Jan Schuffenhauer
2020-04-20 23:20:30 +02:00
parent 1299860e1f
commit 723b765b3e
45 changed files with 466 additions and 2 deletions

View File

@@ -5,4 +5,5 @@ func _ready():
func _on_Hurtbox_area_entered(area):
SoundControler.pub_play_effect("res://Objects/Banana/Banane3.wav",3)
queue_free()

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Banane3.wav-c4d652a8ed02bff4149e35c2d5eb9a8c.sample"
[deps]
source_file="res://Objects/Banana/Banane3.wav"
dest_files=[ "res://.import/Banane3.wav-c4d652a8ed02bff4149e35c2d5eb9a8c.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=false
compress/mode=0

View File

@@ -14,6 +14,7 @@ func _on_Hurtbox_area_entered(area):
health -= area.damage
if(health>0):
return
SoundControler.pub_play_effect("res://Objects/Barrel/Barrel4.wav",3)
queue_free()
var GreenRubies = load("res://Objects/Rubies/Green.tscn")
var BlueRubies = load("res://Objects/Rubies/Blue.tscn")

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Barrel4.wav-f239635eadc7db249770de6f6e044fcc.sample"
[deps]
source_file="res://Objects/Barrel/Barrel4.wav"
dest_files=[ "res://.import/Barrel4.wav-f239635eadc7db249770de6f6e044fcc.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=false
compress/mode=0

View File

@@ -1,5 +1,12 @@
extends StaticBody2D
func _sound_finished():
SoundControler.pub_play_effect("res://Objects/Bonfire/Bonfire.wav",3)
func _ready():
SoundControler.pub_play_effect("res://Objects/Bonfire/Bonfire.wav",3)
SoundControler._effect[3].volume_db = -20
SoundControler._effect[3].connect("finished",self,"_sound_finished")
func _on_Hurtbox_area_entered(area):
queue_free()

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Bonfire.wav-44e8d268003001911b3b6219f2d46058.sample"
[deps]
source_file="res://Objects/Bonfire/Bonfire.wav"
dest_files=[ "res://.import/Bonfire.wav-44e8d268003001911b3b6219f2d46058.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=false
compress/mode=0

View File

@@ -1,5 +1,11 @@
extends Node2D
var CHANNEL = 2
#one sound will be chosen at random
export var SoundLibary :PoolStringArray=[]
func _on_Hurtbox_area_entered(area):
var sound = SoundLibary[rand_range(0,SoundLibary.size())]
SoundControler.pub_play_effect(sound,CHANNEL)
queue_free()

View File

@@ -11,6 +11,7 @@ height = 3.0
[node name="Heart" type="Node2D"]
script = ExtResource( 2 )
SoundLibary = PoolStringArray( "res://Objects/Heart/Sounds/Heart2.wav", "res://Objects/Heart/Sounds/Heart3.wav", "res://Objects/Heart/Sounds/Heart4.wav", "res://Objects/Heart/Sounds/Heart5.wav", "res://Objects/Heart/Sounds/Heart.wav" )
[node name="Kind" parent="." instance=ExtResource( 4 )]
general = 1

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Heart.wav-93ae108d931fc01aec225d77fc0e814f.sample"
[deps]
source_file="res://Objects/Heart/Sounds/Heart.wav"
dest_files=[ "res://.import/Heart.wav-93ae108d931fc01aec225d77fc0e814f.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=false
compress/mode=0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Heart2.wav-a011b583465bc753dfd06f65e32d832c.sample"
[deps]
source_file="res://Objects/Heart/Sounds/Heart2.wav"
dest_files=[ "res://.import/Heart2.wav-a011b583465bc753dfd06f65e32d832c.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=false
compress/mode=0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Heart3.wav-d8aedccf9717ce338c37ea5eb6f14eb7.sample"
[deps]
source_file="res://Objects/Heart/Sounds/Heart3.wav"
dest_files=[ "res://.import/Heart3.wav-d8aedccf9717ce338c37ea5eb6f14eb7.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=false
compress/mode=0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Heart4.wav-2b56c1e163d27baa997ab107ad28cc09.sample"
[deps]
source_file="res://Objects/Heart/Sounds/Heart4.wav"
dest_files=[ "res://.import/Heart4.wav-2b56c1e163d27baa997ab107ad28cc09.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=false
compress/mode=0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Heart5.wav-8f77aba9521b3d9ff5828fad0357c934.sample"
[deps]
source_file="res://Objects/Heart/Sounds/Heart5.wav"
dest_files=[ "res://.import/Heart5.wav-8f77aba9521b3d9ff5828fad0357c934.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=false
compress/mode=0

View File

@@ -5,4 +5,5 @@ extends Node2D
func _on_Hurtbox_area_entered(area):
SoundControler.pub_play_effect("res://Objects/Rubies/emerald3.wav",8)
queue_free()

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/emerald3.wav-e58c6f1da5e6e50b4a361287d9b58f80.sample"
[deps]
source_file="res://Objects/Rubies/emerald3.wav"
dest_files=[ "res://.import/emerald3.wav-e58c6f1da5e6e50b4a361287d9b58f80.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=false
compress/mode=0

View File

@@ -25,3 +25,12 @@ func _on_Hurtbox_area_entered(area):
if(lifePoints<=0):
queue_free()
pass
func _sound_finished():
SoundControler.pub_play_effect("res://Objects/Torch/Torch.wav",4)
func _ready():
SoundControler.pub_play_effect("res://Objects/Torch/Torch.wav",4)
SoundControler._effect[4].volume_db = -20
SoundControler._effect[4].connect("finished",self,"_sound_finished")

BIN
src/Objects/Torch/Torch.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Torch.wav-078204a6d1bdd39208549e4f9258eb09.sample"
[deps]
source_file="res://Objects/Torch/Torch.wav"
dest_files=[ "res://.import/Torch.wav-078204a6d1bdd39208549e4f9258eb09.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=false
compress/mode=0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Barenfalle.wav-7d2cb16985676d58ae72f251521d36e1.sample"
[deps]
source_file="res://Objects/Traps/Bear/Barenfalle.wav"
dest_files=[ "res://.import/Barenfalle.wav-7d2cb16985676d58ae72f251521d36e1.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=false
compress/mode=0

View File

@@ -2,6 +2,7 @@ extends Node2D
func _on_Hurtbox_area_entered(area):
$AnimatedSprite.play("clap")
SoundControler.pub_play_effect("res://Objects/Traps/Bear/Barenfalle.wav",3)
func _ready():

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Fire.wav-84583361f93dd603eebbfa9f5b2316ec.sample"
[deps]
source_file="res://Objects/Traps/Flame/Fire.wav"
dest_files=[ "res://.import/Fire.wav-84583361f93dd603eebbfa9f5b2316ec.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=false
compress/mode=0

View File

@@ -6,6 +6,7 @@ var timer = Timer.new()
func on_timer_timeout():
timer.stop()
SoundControler.pub_stop_effect(4)
queue_free()
func _ready():
@@ -14,6 +15,9 @@ func _ready():
timer.connect("timeout", self, "on_timer_timeout")
timer.set_wait_time(burning_time)
timer.start()
SoundControler.pub_play_effect("res://Objects/Traps/Flame/Fire.wav",5)
SoundControler._effect[5].volume_db = -20
SoundControler._effect[5].connect("finished",self,"_sound_finished")
@@ -21,4 +25,9 @@ func _ready():
func _on_Hitbox_body_entered(body):
if(body.get_name() == "Player"):
body.velocity*=-3
func _sound_finished():
SoundControler.pub_play_effect("res://Objects/Traps/Flame/Fire.wav",5)

View File

@@ -7,10 +7,12 @@ var time = Timer.new()
func _ready():
add_child(time)
$Sprite.play("out")
SoundControler.pub_play_effect("res://Objects/Traps/Spike/Spike6.wav",9)
$"Hitbox/CollisionShape2D".disabled = true
func on_timer_timeout():
$Sprite.play("out")
SoundControler.pub_play_effect("res://Objects/Traps/Spike/Spike6.wav",9)
time.stop()
func _on_Sprite_animation_finished():
@@ -29,6 +31,7 @@ func _on_Sprite_animation_finished():
func _on_Hitbox_area_entered(area):
if($Sprite.get_animation()=="default"):
SoundControler.pub_play_effect("res://Objects/Traps/Spike/Spike6.wav",9)
$Sprite.play("in")

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Spike6.wav-bc77d5918763e2421c9fbe8d547f2a87.sample"
[deps]
source_file="res://Objects/Traps/Spike/Spike6.wav"
dest_files=[ "res://.import/Spike6.wav-bc77d5918763e2421c9fbe8d547f2a87.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=false
compress/mode=0

View File

@@ -699,7 +699,7 @@ shape = SubResource( 47 )
[node name="Pivot" type="Position2D" parent="."]
position = Vector2( 0, -4 )
rotation = 3.14159
rotation = 1.5708
__meta__ = {
"_gizmo_extents_": 20.0
}
@@ -756,6 +756,7 @@ script = ExtResource( 14 )
[node name="Roll" type="Node" parent="AnimationStates"]
script = ExtResource( 16 )
SoundLibary = PoolStringArray( "res://Player/Sounds/roll4.wav", "res://Player/Sounds/roll5.wav", "res://Player/Sounds/roll6.wav" )
[node name="Effects" type="Node2D" parent="."]

BIN
src/Player/Sounds/roll4.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/roll4.wav-113597ca7b30182e560c90a8eb271750.sample"
[deps]
source_file="res://Player/Sounds/roll4.wav"
dest_files=[ "res://.import/roll4.wav-113597ca7b30182e560c90a8eb271750.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=false
compress/mode=0

BIN
src/Player/Sounds/roll5.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/roll5.wav-ac043f34bae365968703b73bd62916d9.sample"
[deps]
source_file="res://Player/Sounds/roll5.wav"
dest_files=[ "res://.import/roll5.wav-ac043f34bae365968703b73bd62916d9.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=false
compress/mode=0

BIN
src/Player/Sounds/roll6.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/roll6.wav-1aa8acb680444b32fcc834ed35ef914e.sample"
[deps]
source_file="res://Player/Sounds/roll6.wav"
dest_files=[ "res://.import/roll6.wav-1aa8acb680444b32fcc834ed35ef914e.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=false
compress/mode=0

View File

@@ -1,8 +1,44 @@
extends "res://Player/States/PlayerAnimationState.gd"
#the channel on which the sound is played
const CHANNEL = 1
#one sound will be chosen at random
export var SoundLibary :PoolStringArray=[]
#the delay between 2 sounds being played, a new sound will only start if the old one is finished
export(float,0,5) var Delay = 0.2
var is_playing_sound:bool =false
var delay_passed:bool=true
var timer:Timer
func _ready():
timer=Timer.new()
self.add_child(timer)
timer.connect("timeout",self,"sig_timer_timeout")
SoundControler._effect[CHANNEL].connect("finished", self, "sig_walk_sound_finished")
func enter():
animation_playback.travel("roll")
func update(delta):
var input_vector = get_input_direction()
animation_tree.set("parameters/roll/blend_position", owner.rollvector)
_play_random_sound()
func _play_random_sound():
if delay_passed and is_playing_sound==false:
var sound = SoundLibary[rand_range(0,SoundLibary.size())]
SoundControler.pub_play_effect(sound,CHANNEL)
is_playing_sound = true
delay_passed=false
#timer.start(Delay)
func sig_timer_timeout ():
delay_passed=true
func sig_walk_sound_finished():
is_playing_sound = false
timer.start(Delay)

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=2]
[gd_scene load_steps=28 format=2]
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://World.gd" type="Script" id=2]
@@ -13,6 +13,10 @@
[ext_resource path="res://Debug/BossStateDisplay.gd" type="Script" id=11]
[ext_resource path="res://Maps/Tilesets/Edge/tileset_edge.png" type="Texture" id=12]
[ext_resource path="res://Boss/Minion.tscn" type="PackedScene" id=13]
[ext_resource path="res://Objects/Traps/Flame/Flame.tscn" type="PackedScene" id=14]
[ext_resource path="res://Objects/Traps/Bear/Bear.tscn" type="PackedScene" id=15]
[ext_resource path="res://Objects/Barrel/Barrel.tscn" type="PackedScene" id=16]
[ext_resource path="res://Objects/Traps/Spike/Spike.tscn" type="PackedScene" id=17]
[ext_resource path="res://Maps/Grid.tscn" type="PackedScene" id=18]
[sub_resource type="ConvexPolygonShape2D" id=1]
@@ -276,6 +280,12 @@ position = Vector2( 240, 120 )
[node name="Minion" parent="YSort" instance=ExtResource( 13 )]
position = Vector2( 24, 184 )
[node name="Flame" parent="YSort" instance=ExtResource( 14 )]
position = Vector2( 168, 120 )
[node name="Flame2" parent="YSort" instance=ExtResource( 14 )]
position = Vector2( 216, 56 )
[node name="Grid" parent="." instance=ExtResource( 18 )]
pause_mode = 1
@@ -345,6 +355,48 @@ anchor_right = 1.0
margin_left = -42.0
margin_bottom = 24.0
text = "Win"
[node name="Bonfire" parent="." instance=ExtResource( 10 )]
position = Vector2( 104, 56 )
[node name="Bear_trap" parent="." instance=ExtResource( 15 )]
position = Vector2( 128, 120 )
[node name="Bear_trap2" parent="." instance=ExtResource( 15 )]
position = Vector2( 160, 88 )
[node name="Bear_trap3" parent="." instance=ExtResource( 15 )]
position = Vector2( 208, 80 )
[node name="Bear_trap4" parent="." instance=ExtResource( 15 )]
position = Vector2( 184, 160 )
[node name="Bear_trap5" parent="." instance=ExtResource( 15 )]
position = Vector2( 304, 80 )
[node name="Bear_trap6" parent="." instance=ExtResource( 15 )]
position = Vector2( 312, 160 )
[node name="Barrel" parent="." instance=ExtResource( 16 )]
position = Vector2( 64, 112 )
[node name="Barrel2" parent="." instance=ExtResource( 16 )]
position = Vector2( 88, 144 )
[node name="Barrel3" parent="." instance=ExtResource( 16 )]
position = Vector2( 120, 160 )
[node name="Spike" parent="." instance=ExtResource( 17 )]
position = Vector2( 168, 40 )
[node name="Spike2" parent="." instance=ExtResource( 17 )]
position = Vector2( 288, 48 )
[node name="Spike3" parent="." instance=ExtResource( 17 )]
position = Vector2( 312, 128 )
[node name="Spike4" parent="." instance=ExtResource( 17 )]
position = Vector2( 224, 152 )
[connection signal="phase_changed" from="YSort/SlimeBoss" to="CanvasLayer/DebugLabel/BossStateDisplay" method="_on_SlimeBoss_phase_changed"]
[connection signal="state_changed" from="YSort/SlimeBoss" to="CanvasLayer/DebugLabel/BossStateDisplay" method="_on_SlimeBoss_state_changed"]
[connection signal="pressed" from="CanvasLayer/Win" to="." method="_on_Win_pressed"]