audiooooo!

This commit is contained in:
MarcEricMartel 2023-10-11 08:36:58 -04:00
parent 5dc0b0a3d6
commit 65391e618b
27 changed files with 320 additions and 14 deletions

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://g78lo8s3varg"
path="res://.godot/imported/wohoho.mp3-c686d1b377ecc4b8214f6a0d5416f222.mp3str"
[deps]
source_file="res://Assets/Audio/Demons/wohoho.mp3"
dest_files=["res://.godot/imported/wohoho.mp3-c686d1b377ecc4b8214f6a0d5416f222.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://eddbr3wwhoi4"
path="res://.godot/imported/wohoho2.mp3-2d127fd3b88672e83c5cdecfd3337822.mp3str"
[deps]
source_file="res://Assets/Audio/Demons/wohoho2.mp3"
dest_files=["res://.godot/imported/wohoho2.mp3-2d127fd3b88672e83c5cdecfd3337822.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bk2lhertq2t2h"
path="res://.godot/imported/wohoho3.mp3-f84ba635b9de35ea940649f48856107a.mp3str"
[deps]
source_file="res://Assets/Audio/Demons/wohoho3.mp3"
dest_files=["res://.godot/imported/wohoho3.mp3-f84ba635b9de35ea940649f48856107a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b6je0ji5pdpj5"
path="res://.godot/imported/skel1.mp3-74ec5c9228e3bfa409594e10cc8c6735.mp3str"
[deps]
source_file="res://Assets/Audio/Skeletons/skel1.mp3"
dest_files=["res://.godot/imported/skel1.mp3-74ec5c9228e3bfa409594e10cc8c6735.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://brupxq7hfj8i4"
path="res://.godot/imported/skel2.mp3-e731eb92b2b6f2ce0f36134ac1bd23fa.mp3str"
[deps]
source_file="res://Assets/Audio/Skeletons/skel2.mp3"
dest_files=["res://.godot/imported/skel2.mp3-e731eb92b2b6f2ce0f36134ac1bd23fa.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bsogb53c5uwgn"
path="res://.godot/imported/skel3.mp3-01ce8a79a24bed1a76e94fadb98e578a.mp3str"
[deps]
source_file="res://Assets/Audio/Skeletons/skel3.mp3"
dest_files=["res://.godot/imported/skel3.mp3-01ce8a79a24bed1a76e94fadb98e578a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b55uvfnjl7lbv"
path="res://.godot/imported/skel4.mp3-67f6f1bb57a9e364f6ef3d487643db29.mp3str"
[deps]
source_file="res://Assets/Audio/Skeletons/skel4.mp3"
dest_files=["res://.godot/imported/skel4.mp3-67f6f1bb57a9e364f6ef3d487643db29.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://j1fxgwc22xsk"
path="res://.godot/imported/mixkit-hellhound-monster-attack-dog-wolf-creature-3015.wav-d4af4eef9fe00598d0249120fb4ddf48.sample"
[deps]
source_file="res://Assets/Audio/Wolves/mixkit-hellhound-monster-attack-dog-wolf-creature-3015.wav"
dest_files=["res://.godot/imported/mixkit-hellhound-monster-attack-dog-wolf-creature-3015.wav-d4af4eef9fe00598d0249120fb4ddf48.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=0

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cvu0rfyj8amhi"
path="res://.godot/imported/mixkit-werewolf-roar-1730.mp3-0caa31d505b41e5558143fd7fb201f2a.mp3str"
[deps]
source_file="res://Assets/Audio/Wolves/mixkit-werewolf-roar-1730.mp3"
dest_files=["res://.godot/imported/mixkit-werewolf-roar-1730.mp3-0caa31d505b41e5558143fd7fb201f2a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://beuuur3tlsjrp"
path="res://.godot/imported/mixkit-wolves-pack-howling-1776.wav-d747b7898a86acf89b0edf9ecb106da5.sample"
[deps]
source_file="res://Assets/Audio/Wolves/mixkit-wolves-pack-howling-1776.wav"
dest_files=["res://.godot/imported/mixkit-wolves-pack-howling-1776.wav-d747b7898a86acf89b0edf9ecb106da5.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=0

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cehvi30d0pbnw"
path="res://.godot/imported/cave_ambience.mp3-23c57d78230ea4df31beca4244197df4.mp3str"
[deps]
source_file="res://Assets/Audio/cave_ambience.mp3"
dest_files=["res://.godot/imported/cave_ambience.mp3-23c57d78230ea4df31beca4244197df4.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -2,8 +2,8 @@
[ext_resource type="Script" path="res://Scripts/level.gd" id="1_0nmok"]
[ext_resource type="PackedScene" uid="uid://b8s2seg2lf7wo" path="res://Scenes/Tilemaps/tileset_1.tscn" id="1_4n82n"]
[ext_resource type="PackedScene" uid="uid://cl7w6ndvons1a" path="res://Scenes/Props/candle_1.tscn" id="2_5hdq4"]
[ext_resource type="PackedScene" uid="uid://by2xmwcng01uy" path="res://Scenes/Props/candle_2.tscn" id="2_o33c4"]
[ext_resource type="PackedScene" uid="uid://dgtscjxcqoxls" path="res://Scenes/Props/candle_1.tscn" id="2_5hdq4"]
[ext_resource type="PackedScene" uid="uid://cf7al5uln33rn" path="res://Scenes/Props/candle_2.tscn" id="2_o33c4"]
[ext_resource type="PackedScene" uid="uid://b5lnjonlf4i1b" path="res://Scenes/enemy.tscn" id="4_g0oey"]
[ext_resource type="PackedScene" uid="uid://0onqgygm832d" path="res://Scenes/Player/player.tscn" id="5_ik47y"]
[ext_resource type="AudioStream" uid="uid://c3dy35dv368ft" path="res://Assets/Music/SisNeufPiDoozHuit.mp3" id="7_but47"]

View File

@ -1,8 +1,13 @@
[gd_scene load_steps=5 format=3 uid="uid://brnx3xyyd0e71"]
[gd_scene load_steps=10 format=3 uid="uid://brnx3xyyd0e71"]
[ext_resource type="PackedScene" uid="uid://kkfxguj0lr5a" path="res://Scenes/Spawnables/template_spawnable.tscn" id="1_verf7"]
[ext_resource type="Texture2D" uid="uid://ddvr5ltbo8ome" path="res://Assets/Bat/noBKG_BatFlight_strip.png" id="2_0p8tq"]
[ext_resource type="Script" path="res://Scenes/Spawnables/AIs/ai_bat.gd" id="2_x3ldf"]
[ext_resource type="AudioStream" uid="uid://cy210ijd2v1dt" path="res://Assets/Audio/Bats/bat_spawn1.mp3" id="4_23i1n"]
[ext_resource type="AudioStream" uid="uid://cgtd1h5ewkq5d" path="res://Assets/Audio/Bats/bat_spawn2.mp3" id="5_lxf0c"]
[ext_resource type="AudioStream" uid="uid://dbwrhm30srugh" path="res://Assets/Audio/Bats/bat_spawn3.mp3" id="6_i83i4"]
[ext_resource type="AudioStream" uid="uid://gd8crqxuiivn" path="res://Assets/Audio/Bats/bat_spawn4.mp3" id="7_hh1mb"]
[ext_resource type="AudioStream" uid="uid://dyl0goef8y6bu" path="res://Assets/Audio/Bats/bat_spawn5.mp3" id="8_o2d7p"]
[sub_resource type="AtlasTexture" id="AtlasTexture_bnd0j"]
atlas = ExtResource("2_0p8tq")
@ -26,3 +31,18 @@ frame_progress = 0.482614
[node name="AI" parent="." index="5"]
script = ExtResource("2_x3ldf")
[node name="Spawn1" parent="." index="8"]
stream = ExtResource("4_23i1n")
[node name="Spawn2" parent="." index="9"]
stream = ExtResource("5_lxf0c")
[node name="Spawn3" parent="." index="10"]
stream = ExtResource("6_i83i4")
[node name="Spawn4" parent="." index="11"]
stream = ExtResource("7_hh1mb")
[node name="Spawn5" parent="." index="12"]
stream = ExtResource("8_o2d7p")

View File

@ -3,6 +3,8 @@ extends CharacterBody2D
const ATTACK_COOLDOWN : float = 100
var rng = RandomNumberGenerator.new()
@export var maxHp : int = 0
@export var attackSpeed : float = 0
@export var speed : float = 0
@ -22,6 +24,9 @@ const ATTACK_COOLDOWN : float = 100
@onready var damageCollision : CollisionShape2D = $DamageArea/DamageCollision
@onready var bodyCollision : CollisionShape2D = $BodyCollision
@onready var spawnableUI : Control = $UIContainer/SpawnableUI
@onready var spawnSnd: Array = [ $Spawn1, $Spawn2, $Spawn3, $Spawn4, $Spawn5 ]
@onready var hitSnd: Array = [ $Hit1, $Hit2, $Hit3, $Hit4, $Hit5 ]
@onready var dieSnd: Array = [ $Die1, $Die2, $Die3, $Die4, $Die5 ]
var isAlive : bool = true
var isFacingLeft : bool = false
@ -88,6 +93,7 @@ func endAttack():
animatedSprite.play("default")
func receive_damage(dmg):
hitSnd[rng.randi_range(0,4)].play();
if !isAlive:
return
if currentHp - dmg <= 0:
@ -98,6 +104,7 @@ func receive_damage(dmg):
spawnableUI.setHP(currentHp, maxHp)
func die():
dieSnd[rng.randi_range(0,4)].play();
enemy.remove_foe(self)
signal_death.emit(self)
bodyCollision.disabled = true
@ -123,3 +130,8 @@ func clean():
func _on_damage_area_body_entered(body):
if body == enemy:
body.receive_damage(damage)
func _on_tree_entered():
spawnSnd[rng.randi_range(0,4)].play();

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=39 format=3 uid="uid://kkfxguj0lr5a"]
[gd_scene load_steps=40 format=3 uid="uid://kkfxguj0lr5a"]
[ext_resource type="Script" path="res://Scenes/Spawnables/template_spawnable.gd" id="1_rkej7"]
[ext_resource type="Texture2D" uid="uid://f60ndepwmpj2" path="res://Assets/Bat/noBKG_BatAttack_strip.png" id="2_7ayi7"]
[ext_resource type="Texture2D" uid="uid://bd74k1s6qdx2r" path="res://Assets/Bat/noBKG_BatDeath_strip.png" id="3_jipj7"]
[ext_resource type="Texture2D" uid="uid://ddvr5ltbo8ome" path="res://Assets/Bat/noBKG_BatFlight_strip.png" id="4_u36ok"]
[ext_resource type="PackedScene" uid="uid://fojbwshce7ah" path="res://Scenes/Spawnables/UI/SpawnableUI.tscn" id="5_c2blu"]
[ext_resource type="AudioStream" uid="uid://c5llasu6omp0p" path="res://Assets/Audio/punch-140236.mp3" id="6_jg6bm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_y0lcs"]
atlas = ExtResource("2_7ayi7")
@ -289,4 +290,45 @@ debug_color = Color(0.639216, 0, 0.156863, 0.419608)
[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
occluder = SubResource("OccluderPolygon2D_qtt12")
[node name="Spawn1" type="AudioStreamPlayer2D" parent="."]
[node name="Spawn2" type="AudioStreamPlayer2D" parent="."]
[node name="Spawn3" type="AudioStreamPlayer2D" parent="."]
[node name="Spawn4" type="AudioStreamPlayer2D" parent="."]
[node name="Spawn5" type="AudioStreamPlayer2D" parent="."]
[node name="Hit1" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_jg6bm")
pitch_scale = 1.78
[node name="Hit2" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_jg6bm")
pitch_scale = 2.51
[node name="Hit3" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_jg6bm")
pitch_scale = 1.3
[node name="Hit4" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_jg6bm")
pitch_scale = 1.68
[node name="Hit5" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_jg6bm")
pitch_scale = 1.17
[node name="Die1" type="AudioStreamPlayer2D" parent="."]
[node name="Die2" type="AudioStreamPlayer2D" parent="."]
[node name="Die3" type="AudioStreamPlayer2D" parent="."]
[node name="Die4" type="AudioStreamPlayer2D" parent="."]
[node name="Die5" type="AudioStreamPlayer2D" parent="."]
[connection signal="tree_entered" from="." to="." method="_on_tree_entered"]
[connection signal="body_entered" from="DamageArea" to="." method="_on_damage_area_body_entered"]

View File

@ -1,10 +1,13 @@
[gd_scene load_steps=54 format=3 uid="uid://35re5c6wyhp5"]
[gd_scene load_steps=57 format=3 uid="uid://cwlfq7dnrtgh7"]
[ext_resource type="PackedScene" uid="uid://kkfxguj0lr5a" path="res://Scenes/Spawnables/template_spawnable.tscn" id="1_t7ryl"]
[ext_resource type="Texture2D" uid="uid://bnch5lviqbpka" path="res://Assets/Wolf/noBKG_WolfRun_strip.png" id="2_35toa"]
[ext_resource type="Texture2D" uid="uid://bvscc18reoyoo" path="res://Assets/Wolf/noBKG_WolfAttack_strip.png" id="2_arbvu"]
[ext_resource type="Texture2D" uid="uid://dd1cbeyvlpn53" path="res://Assets/Wolf/noBKG_WolfIdle_strip.png" id="2_bk8d7"]
[ext_resource type="Texture2D" uid="uid://cowhod231qvc7" path="res://Assets/Wolf/noBKG_WolfDeath_strip.png" id="3_tbpyw"]
[ext_resource type="AudioStream" uid="uid://j1fxgwc22xsk" path="res://Assets/Audio/Wolves/mixkit-hellhound-monster-attack-dog-wolf-creature-3015.wav" id="6_1imso"]
[ext_resource type="AudioStream" uid="uid://cvu0rfyj8amhi" path="res://Assets/Audio/Wolves/mixkit-werewolf-roar-1730.mp3" id="7_brppl"]
[ext_resource type="AudioStream" uid="uid://beuuur3tlsjrp" path="res://Assets/Audio/Wolves/mixkit-wolves-pack-howling-1776.wav" id="8_k62ik"]
[sub_resource type="AtlasTexture" id="AtlasTexture_n1jpo"]
atlas = ExtResource("2_bk8d7")
@ -353,6 +356,7 @@ offset_bottom = 2.0
[node name="AnimatedSprite2D" parent="." index="1"]
sprite_frames = SubResource("SpriteFrames_iknep")
animation = &"default"
frame = 0
frame_progress = 0.996176
[node name="BodyCollision" parent="." index="2"]
@ -369,3 +373,20 @@ shape = SubResource("CapsuleShape2D_dmcm0")
[node name="LightOccluder2D" parent="." index="7"]
position = Vector2(3, 0)
occluder = SubResource("OccluderPolygon2D_jmta4")
[node name="Spawn1" parent="." index="8"]
stream = ExtResource("6_1imso")
[node name="Spawn2" parent="." index="9"]
stream = ExtResource("7_brppl")
[node name="Spawn3" parent="." index="10"]
stream = ExtResource("8_k62ik")
[node name="Spawn4" parent="." index="11"]
stream = ExtResource("6_1imso")
pitch_scale = 0.83
[node name="Spawn5" parent="." index="12"]
stream = ExtResource("7_brppl")
pitch_scale = 0.8

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=62 format=3 uid="uid://b5lnjonlf4i1b"]
[gd_scene load_steps=61 format=3 uid="uid://b5lnjonlf4i1b"]
[ext_resource type="Script" path="res://Scripts/Enemy.gd" id="1_xj62t"]
[ext_resource type="Texture2D" uid="uid://xn7yb3f5w17m" path="res://Assets/Knight/noBKG_KnightAttack_strip.png" id="2_dclcl"]
@ -11,9 +11,6 @@
[ext_resource type="AudioStream" uid="uid://dj7884l6tki3g" path="res://Assets/Audio/whoosh.ogg" id="8_ygdkj"]
[ext_resource type="AudioStream" uid="uid://bmu622w5ea05y" path="res://Assets/Audio/mixkit-weak-fast-blow-2145.wav" id="9_myh6x"]
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_xq5nx"]
polygon = PackedVector2Array(-2, 11, 2, 2, 2, -7, 0, -18, -5, -18, -6, -7, -6, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_6gjg8"]
atlas = ExtResource("2_dclcl")
region = Rect2(1296, 0, 144, 64)
@ -382,10 +379,6 @@ position = Vector2(10, 10)
collision_layer = 5
collision_mask = 5
script = ExtResource("1_xj62t")
maxhp = 50
[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
occluder = SubResource("OccluderPolygon2D_xq5nx")
[node name="Sprite" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_dqf8u")
@ -456,7 +449,6 @@ position = Vector2(0, -3)
shape = SubResource("CapsuleShape2D_p2hkm")
[node name="AttackArea" type="Area2D" parent="."]
visible = false
collision_layer = 2
collision_mask = 2