diff --git a/Cargo.lock b/Cargo.lock index 7c8fbc7..98cc702 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2338,6 +2338,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +[[package]] +name = "hound" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d13cdbd5dbb29f9c88095bbdc2590c9cba0d0a1269b983fef6b2cdd7e9f4db1" + [[package]] name = "ident_case" version = "1.0.1" @@ -3451,6 +3457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdf1d4dea18dff2e9eb6dca123724f8b60ef44ad74a9ad283cdfe025df7e73fa" dependencies = [ "cpal", + "hound", "lewton", ] diff --git a/Cargo.toml b/Cargo.toml index c4a4cae..6c1c4aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ opt-level = 3 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = "*" +bevy = { version = "*", features = [ "wav" ] } rand = "*" winit = "0.27.5" image = "*" diff --git a/assets/RPG Sound Pack/.DS_Store b/assets/RPG Sound Pack/.DS_Store new file mode 100644 index 0000000..0620801 Binary files /dev/null and b/assets/RPG Sound Pack/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/beetle/.DS_Store b/assets/RPG Sound Pack/NPC/beetle/.DS_Store new file mode 100644 index 0000000..692e200 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/beetle/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/beetle/bite-small.wav b/assets/RPG Sound Pack/NPC/beetle/bite-small.wav new file mode 100644 index 0000000..eb29d52 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/beetle/bite-small.wav differ diff --git a/assets/RPG Sound Pack/NPC/beetle/bite-small2.wav b/assets/RPG Sound Pack/NPC/beetle/bite-small2.wav new file mode 100644 index 0000000..d395e4d Binary files /dev/null and b/assets/RPG Sound Pack/NPC/beetle/bite-small2.wav differ diff --git a/assets/RPG Sound Pack/NPC/beetle/bite-small3.wav b/assets/RPG Sound Pack/NPC/beetle/bite-small3.wav new file mode 100644 index 0000000..1c4d53e Binary files /dev/null and b/assets/RPG Sound Pack/NPC/beetle/bite-small3.wav differ diff --git a/assets/RPG Sound Pack/NPC/giant/.DS_Store b/assets/RPG Sound Pack/NPC/giant/.DS_Store new file mode 100644 index 0000000..a5cbaa9 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/giant/giant1.wav b/assets/RPG Sound Pack/NPC/giant/giant1.wav new file mode 100644 index 0000000..99f0696 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/giant1.wav differ diff --git a/assets/RPG Sound Pack/NPC/giant/giant2.wav b/assets/RPG Sound Pack/NPC/giant/giant2.wav new file mode 100644 index 0000000..112f8d6 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/giant2.wav differ diff --git a/assets/RPG Sound Pack/NPC/giant/giant3.wav b/assets/RPG Sound Pack/NPC/giant/giant3.wav new file mode 100644 index 0000000..d236ff7 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/giant3.wav differ diff --git a/assets/RPG Sound Pack/NPC/giant/giant4.wav b/assets/RPG Sound Pack/NPC/giant/giant4.wav new file mode 100644 index 0000000..3b607bd Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/giant4.wav differ diff --git a/assets/RPG Sound Pack/NPC/giant/giant5.wav b/assets/RPG Sound Pack/NPC/giant/giant5.wav new file mode 100644 index 0000000..434e490 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/giant/giant5.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/.DS_Store b/assets/RPG Sound Pack/NPC/gutteral beast/.DS_Store new file mode 100644 index 0000000..eb6a41b Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr1.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr1.wav new file mode 100644 index 0000000..9f58934 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr1.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr10.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr10.wav new file mode 100644 index 0000000..58edfea Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr10.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr11.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr11.wav new file mode 100644 index 0000000..32d7907 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr11.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr12.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr12.wav new file mode 100644 index 0000000..26723ee Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr12.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr13.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr13.wav new file mode 100644 index 0000000..164e472 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr13.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr14.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr14.wav new file mode 100644 index 0000000..fe41083 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr14.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr15.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr15.wav new file mode 100644 index 0000000..a87e96d Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr15.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr2.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr2.wav new file mode 100644 index 0000000..db547ec Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr2.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr3.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr3.wav new file mode 100644 index 0000000..b138a3c Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr3.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr4.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr4.wav new file mode 100644 index 0000000..9e5d6ea Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr4.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr5.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr5.wav new file mode 100644 index 0000000..a116c52 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr5.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr6.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr6.wav new file mode 100644 index 0000000..09ad165 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr6.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr7.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr7.wav new file mode 100644 index 0000000..3afb714 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr7.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr8.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr8.wav new file mode 100644 index 0000000..b6c8b1f Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr8.wav differ diff --git a/assets/RPG Sound Pack/NPC/gutteral beast/mnstr9.wav b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr9.wav new file mode 100644 index 0000000..bce58b0 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/gutteral beast/mnstr9.wav differ diff --git a/assets/RPG Sound Pack/NPC/misc/.DS_Store b/assets/RPG Sound Pack/NPC/misc/.DS_Store new file mode 100644 index 0000000..2887557 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/misc/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/misc/wolfman.wav b/assets/RPG Sound Pack/NPC/misc/wolfman.wav new file mode 100644 index 0000000..e3dea96 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/misc/wolfman.wav differ diff --git a/assets/RPG Sound Pack/NPC/ogre/.DS_Store b/assets/RPG Sound Pack/NPC/ogre/.DS_Store new file mode 100644 index 0000000..782dc19 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/.DS_Store differ diff --git a/assets/RPG Sound Pack/NPC/ogre/ogre1.wav b/assets/RPG Sound Pack/NPC/ogre/ogre1.wav new file mode 100644 index 0000000..98dc842 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/ogre1.wav differ diff --git a/assets/RPG Sound Pack/NPC/ogre/ogre2.wav b/assets/RPG Sound Pack/NPC/ogre/ogre2.wav new file mode 100644 index 0000000..c174f4e Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/ogre2.wav differ diff --git a/assets/RPG Sound Pack/NPC/ogre/ogre3.wav b/assets/RPG Sound Pack/NPC/ogre/ogre3.wav new file mode 100644 index 0000000..8f213f3 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/ogre3.wav differ diff --git a/assets/RPG Sound Pack/NPC/ogre/ogre4.wav b/assets/RPG Sound Pack/NPC/ogre/ogre4.wav new file mode 100644 index 0000000..870c3c1 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/ogre4.wav differ diff --git a/assets/RPG Sound Pack/NPC/ogre/ogre5.wav b/assets/RPG Sound Pack/NPC/ogre/ogre5.wav new file mode 100644 index 0000000..e7c0e41 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/ogre/ogre5.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade1.wav b/assets/RPG Sound Pack/NPC/shade/shade1.wav new file mode 100644 index 0000000..b9b11c4 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade1.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade10.wav b/assets/RPG Sound Pack/NPC/shade/shade10.wav new file mode 100644 index 0000000..bdfc76a Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade10.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade11.wav b/assets/RPG Sound Pack/NPC/shade/shade11.wav new file mode 100644 index 0000000..92c0d9a Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade11.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade12.wav b/assets/RPG Sound Pack/NPC/shade/shade12.wav new file mode 100644 index 0000000..68229e3 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade12.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade13.wav b/assets/RPG Sound Pack/NPC/shade/shade13.wav new file mode 100644 index 0000000..a9b907e Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade13.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade14.wav b/assets/RPG Sound Pack/NPC/shade/shade14.wav new file mode 100644 index 0000000..e37e0e9 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade14.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade15.wav b/assets/RPG Sound Pack/NPC/shade/shade15.wav new file mode 100644 index 0000000..1bdc2c6 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade15.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade2.wav b/assets/RPG Sound Pack/NPC/shade/shade2.wav new file mode 100644 index 0000000..e531565 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade2.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade3.wav b/assets/RPG Sound Pack/NPC/shade/shade3.wav new file mode 100644 index 0000000..b1cd3eb Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade3.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade4.wav b/assets/RPG Sound Pack/NPC/shade/shade4.wav new file mode 100644 index 0000000..d1bb871 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade4.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade5.wav b/assets/RPG Sound Pack/NPC/shade/shade5.wav new file mode 100644 index 0000000..604dcd7 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade5.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade6.wav b/assets/RPG Sound Pack/NPC/shade/shade6.wav new file mode 100644 index 0000000..1221175 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade6.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade7.wav b/assets/RPG Sound Pack/NPC/shade/shade7.wav new file mode 100644 index 0000000..9ca5b9b Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade7.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade8.wav b/assets/RPG Sound Pack/NPC/shade/shade8.wav new file mode 100644 index 0000000..6fa4b83 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade8.wav differ diff --git a/assets/RPG Sound Pack/NPC/shade/shade9.wav b/assets/RPG Sound Pack/NPC/shade/shade9.wav new file mode 100644 index 0000000..90914b4 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/shade/shade9.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime1.wav b/assets/RPG Sound Pack/NPC/slime/slime1.wav new file mode 100644 index 0000000..f2045e2 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime1.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime10.wav b/assets/RPG Sound Pack/NPC/slime/slime10.wav new file mode 100644 index 0000000..68b8990 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime10.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime2.wav b/assets/RPG Sound Pack/NPC/slime/slime2.wav new file mode 100644 index 0000000..576e75d Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime2.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime3.wav b/assets/RPG Sound Pack/NPC/slime/slime3.wav new file mode 100644 index 0000000..d5c5085 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime3.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime4.wav b/assets/RPG Sound Pack/NPC/slime/slime4.wav new file mode 100644 index 0000000..9e97b9c Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime4.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime5.wav b/assets/RPG Sound Pack/NPC/slime/slime5.wav new file mode 100644 index 0000000..adf7592 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime5.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime6.wav b/assets/RPG Sound Pack/NPC/slime/slime6.wav new file mode 100644 index 0000000..1c4fff9 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime6.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime7.wav b/assets/RPG Sound Pack/NPC/slime/slime7.wav new file mode 100644 index 0000000..392508c Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime7.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime8.wav b/assets/RPG Sound Pack/NPC/slime/slime8.wav new file mode 100644 index 0000000..8c8d9e5 Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime8.wav differ diff --git a/assets/RPG Sound Pack/NPC/slime/slime9.wav b/assets/RPG Sound Pack/NPC/slime/slime9.wav new file mode 100644 index 0000000..1c78bdb Binary files /dev/null and b/assets/RPG Sound Pack/NPC/slime/slime9.wav differ diff --git a/assets/RPG Sound Pack/battle/magic1.wav b/assets/RPG Sound Pack/battle/magic1.wav new file mode 100644 index 0000000..469284e Binary files /dev/null and b/assets/RPG Sound Pack/battle/magic1.wav differ diff --git a/assets/RPG Sound Pack/battle/spell.wav b/assets/RPG Sound Pack/battle/spell.wav new file mode 100644 index 0000000..4a41aa4 Binary files /dev/null and b/assets/RPG Sound Pack/battle/spell.wav differ diff --git a/assets/RPG Sound Pack/battle/swing.wav b/assets/RPG Sound Pack/battle/swing.wav new file mode 100644 index 0000000..796b3e9 Binary files /dev/null and b/assets/RPG Sound Pack/battle/swing.wav differ diff --git a/assets/RPG Sound Pack/battle/swing2.wav b/assets/RPG Sound Pack/battle/swing2.wav new file mode 100644 index 0000000..6d9c38e Binary files /dev/null and b/assets/RPG Sound Pack/battle/swing2.wav differ diff --git a/assets/RPG Sound Pack/battle/swing3.wav b/assets/RPG Sound Pack/battle/swing3.wav new file mode 100644 index 0000000..c631abb Binary files /dev/null and b/assets/RPG Sound Pack/battle/swing3.wav differ diff --git a/assets/RPG Sound Pack/battle/sword-unsheathe.wav b/assets/RPG Sound Pack/battle/sword-unsheathe.wav new file mode 100644 index 0000000..d694c76 Binary files /dev/null and b/assets/RPG Sound Pack/battle/sword-unsheathe.wav differ diff --git a/assets/RPG Sound Pack/battle/sword-unsheathe2.wav b/assets/RPG Sound Pack/battle/sword-unsheathe2.wav new file mode 100644 index 0000000..e8f69f0 Binary files /dev/null and b/assets/RPG Sound Pack/battle/sword-unsheathe2.wav differ diff --git a/assets/RPG Sound Pack/battle/sword-unsheathe3.wav b/assets/RPG Sound Pack/battle/sword-unsheathe3.wav new file mode 100644 index 0000000..b277aca Binary files /dev/null and b/assets/RPG Sound Pack/battle/sword-unsheathe3.wav differ diff --git a/assets/RPG Sound Pack/battle/sword-unsheathe4.wav b/assets/RPG Sound Pack/battle/sword-unsheathe4.wav new file mode 100644 index 0000000..03f09b0 Binary files /dev/null and b/assets/RPG Sound Pack/battle/sword-unsheathe4.wav differ diff --git a/assets/RPG Sound Pack/battle/sword-unsheathe5.wav b/assets/RPG Sound Pack/battle/sword-unsheathe5.wav new file mode 100644 index 0000000..e2f3375 Binary files /dev/null and b/assets/RPG Sound Pack/battle/sword-unsheathe5.wav differ diff --git a/assets/RPG Sound Pack/interface/interface1.wav b/assets/RPG Sound Pack/interface/interface1.wav new file mode 100644 index 0000000..e8b324b Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface1.wav differ diff --git a/assets/RPG Sound Pack/interface/interface2.wav b/assets/RPG Sound Pack/interface/interface2.wav new file mode 100644 index 0000000..97f8433 Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface2.wav differ diff --git a/assets/RPG Sound Pack/interface/interface3.wav b/assets/RPG Sound Pack/interface/interface3.wav new file mode 100644 index 0000000..24473c4 Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface3.wav differ diff --git a/assets/RPG Sound Pack/interface/interface4.wav b/assets/RPG Sound Pack/interface/interface4.wav new file mode 100644 index 0000000..a688fc4 Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface4.wav differ diff --git a/assets/RPG Sound Pack/interface/interface5.wav b/assets/RPG Sound Pack/interface/interface5.wav new file mode 100644 index 0000000..000c8e2 Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface5.wav differ diff --git a/assets/RPG Sound Pack/interface/interface6.wav b/assets/RPG Sound Pack/interface/interface6.wav new file mode 100644 index 0000000..9098952 Binary files /dev/null and b/assets/RPG Sound Pack/interface/interface6.wav differ diff --git a/assets/RPG Sound Pack/inventory/armor-light.wav b/assets/RPG Sound Pack/inventory/armor-light.wav new file mode 100644 index 0000000..dd704a0 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/armor-light.wav differ diff --git a/assets/RPG Sound Pack/inventory/beads.wav b/assets/RPG Sound Pack/inventory/beads.wav new file mode 100644 index 0000000..61607c6 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/beads.wav differ diff --git a/assets/RPG Sound Pack/inventory/bottle.wav b/assets/RPG Sound Pack/inventory/bottle.wav new file mode 100644 index 0000000..54ddc33 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/bottle.wav differ diff --git a/assets/RPG Sound Pack/inventory/bubble.wav b/assets/RPG Sound Pack/inventory/bubble.wav new file mode 100644 index 0000000..21292c1 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/bubble.wav differ diff --git a/assets/RPG Sound Pack/inventory/bubble2.wav b/assets/RPG Sound Pack/inventory/bubble2.wav new file mode 100644 index 0000000..7cd39cb Binary files /dev/null and b/assets/RPG Sound Pack/inventory/bubble2.wav differ diff --git a/assets/RPG Sound Pack/inventory/bubble3.wav b/assets/RPG Sound Pack/inventory/bubble3.wav new file mode 100644 index 0000000..6598222 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/bubble3.wav differ diff --git a/assets/RPG Sound Pack/inventory/chainmail1.wav b/assets/RPG Sound Pack/inventory/chainmail1.wav new file mode 100644 index 0000000..b74c72e Binary files /dev/null and b/assets/RPG Sound Pack/inventory/chainmail1.wav differ diff --git a/assets/RPG Sound Pack/inventory/chainmail2.wav b/assets/RPG Sound Pack/inventory/chainmail2.wav new file mode 100644 index 0000000..aeece91 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/chainmail2.wav differ diff --git a/assets/RPG Sound Pack/inventory/cloth-heavy.wav b/assets/RPG Sound Pack/inventory/cloth-heavy.wav new file mode 100644 index 0000000..c979b09 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/cloth-heavy.wav differ diff --git a/assets/RPG Sound Pack/inventory/cloth.wav b/assets/RPG Sound Pack/inventory/cloth.wav new file mode 100644 index 0000000..8d11f48 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/cloth.wav differ diff --git a/assets/RPG Sound Pack/inventory/coin.wav b/assets/RPG Sound Pack/inventory/coin.wav new file mode 100644 index 0000000..d7fc023 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/coin.wav differ diff --git a/assets/RPG Sound Pack/inventory/coin2.wav b/assets/RPG Sound Pack/inventory/coin2.wav new file mode 100644 index 0000000..b208c65 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/coin2.wav differ diff --git a/assets/RPG Sound Pack/inventory/coin3.wav b/assets/RPG Sound Pack/inventory/coin3.wav new file mode 100644 index 0000000..378a5ad Binary files /dev/null and b/assets/RPG Sound Pack/inventory/coin3.wav differ diff --git a/assets/RPG Sound Pack/inventory/metal-ringing.wav b/assets/RPG Sound Pack/inventory/metal-ringing.wav new file mode 100644 index 0000000..01731b2 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/metal-ringing.wav differ diff --git a/assets/RPG Sound Pack/inventory/metal-small1.wav b/assets/RPG Sound Pack/inventory/metal-small1.wav new file mode 100644 index 0000000..869c2a6 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/metal-small1.wav differ diff --git a/assets/RPG Sound Pack/inventory/metal-small2.wav b/assets/RPG Sound Pack/inventory/metal-small2.wav new file mode 100644 index 0000000..eef4581 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/metal-small2.wav differ diff --git a/assets/RPG Sound Pack/inventory/metal-small3.wav b/assets/RPG Sound Pack/inventory/metal-small3.wav new file mode 100644 index 0000000..f5b4265 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/metal-small3.wav differ diff --git a/assets/RPG Sound Pack/inventory/wood-small.wav b/assets/RPG Sound Pack/inventory/wood-small.wav new file mode 100644 index 0000000..47c4fb8 Binary files /dev/null and b/assets/RPG Sound Pack/inventory/wood-small.wav differ diff --git a/assets/RPG Sound Pack/misc/burp.wav b/assets/RPG Sound Pack/misc/burp.wav new file mode 100644 index 0000000..5412224 Binary files /dev/null and b/assets/RPG Sound Pack/misc/burp.wav differ diff --git a/assets/RPG Sound Pack/misc/random1.wav b/assets/RPG Sound Pack/misc/random1.wav new file mode 100644 index 0000000..0664953 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random1.wav differ diff --git a/assets/RPG Sound Pack/misc/random2.wav b/assets/RPG Sound Pack/misc/random2.wav new file mode 100644 index 0000000..44317d9 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random2.wav differ diff --git a/assets/RPG Sound Pack/misc/random3.wav b/assets/RPG Sound Pack/misc/random3.wav new file mode 100644 index 0000000..3079c47 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random3.wav differ diff --git a/assets/RPG Sound Pack/misc/random4.wav b/assets/RPG Sound Pack/misc/random4.wav new file mode 100644 index 0000000..3aec966 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random4.wav differ diff --git a/assets/RPG Sound Pack/misc/random5.wav b/assets/RPG Sound Pack/misc/random5.wav new file mode 100644 index 0000000..fcbac17 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random5.wav differ diff --git a/assets/RPG Sound Pack/misc/random6.wav b/assets/RPG Sound Pack/misc/random6.wav new file mode 100644 index 0000000..5f7e8c0 Binary files /dev/null and b/assets/RPG Sound Pack/misc/random6.wav differ diff --git a/assets/RPG Sound Pack/world/door.wav b/assets/RPG Sound Pack/world/door.wav new file mode 100644 index 0000000..7560e35 Binary files /dev/null and b/assets/RPG Sound Pack/world/door.wav differ diff --git a/src/combat_system/melee.rs b/src/combat_system/melee.rs index 474b72e..2585b8f 100644 --- a/src/combat_system/melee.rs +++ b/src/combat_system/melee.rs @@ -1,4 +1,4 @@ -use crate::prelude::*; +use crate::{prelude::*, initializations::load::SoundEffect}; pub fn combat_system_melee( mut commands: Commands, @@ -104,12 +104,14 @@ fn do_melee_damage( attacked_entity: Entity, body1: &PhysicalBody, body2: &mut PhysicalBody, + asset_server: &Res ) { - body2.attributes.health -= + let damage = 1 + (body1.attributes.strength - body2.attributes.constitution).max(0).min(20) + (body1.skillset.brawling.level()).max(0).min(20) ; + body2.attributes.health -= damage; if body2.attributes.health <= 0 { commands.entity(attacked_entity).despawn_recursive(); } @@ -117,11 +119,21 @@ fn do_melee_damage( danger_type: DangerType::Attacked, danger_source: attacker_entity, }); + + // Play a sound effect. + commands.spawn(( + AudioBundle { + source: asset_server.load("RPG Sound Pack/battle/swing.wav"), + settings: PlaybackSettings::ONCE.with_volume(bevy::audio::Volume::new_relative(0.1)), + }, + SoundEffect, + )); } pub fn attacked_entities_system( mut commands: Commands, attacked_query: Query<(Entity, &Attacked), With>, mut physical_bodies: Query<(Entity, &mut PhysicalBody)>, + asset_server: Res ) { for (attacked_entity, attack_info) in attacked_query.iter() { commands.entity(attacked_entity).remove::(); @@ -139,7 +151,7 @@ pub fn attacked_entities_system( // Now do the damage to the attacked body. for (entity, mut physical_body) in physical_bodies.iter_mut() { if entity == attacked_entity { - do_melee_damage(&mut commands, attacker_entity, attacked_entity, &attacker_physical_body, &mut physical_body); + do_melee_damage(&mut commands, attacker_entity, attacked_entity, &attacker_physical_body, &mut physical_body, &asset_server); } } } diff --git a/src/initializations/load.rs b/src/initializations/load.rs index 800bddf..46f98a8 100644 --- a/src/initializations/load.rs +++ b/src/initializations/load.rs @@ -16,4 +16,19 @@ pub fn load_font( mut font_handle: ResMut, ) { *font_handle = MyFont(asset_server.load("fonts/Helvetica.ttf")); -} \ No newline at end of file +} +pub fn load_sfx( + mut commands: Commands, + asset_server: Res +) { + // commands.spawn(( + // AudioBundle { + // source: asset_server.load("RPG Sound Pack/battle/swing.wav"), + // settings: PlaybackSettings::ONCE.paused().with_volume(bevy::audio::Volume::new_relative(0.5)), + // }, + // SoundEffect, + // )); +} + +#[derive(Component)] +pub struct SoundEffect; \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 8f55fde..f73b653 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,36 +1,6 @@ -// use bevy::time::FixedTimestep; mod prelude; pub use crate::prelude::*; -// #[mod_use( -// biome, -// button_system, -// combat_system, -// components, -// constants, -// interface, -// load, -// main_menu, -// map, -// monstergenerator_system, -// moverandom_system, -// movetoward_system, -// namegiving_system, -// names_system, -// needs, -// pause, -// resources, -// seasons, -// selection_systems, -// spoilage_system, -// startup, -// statusdisplay_system, -// task_system, -// text_system, -// thinking_system, -// unitgenerator_system, -// window_system -// )] mod button_system; use button_system::*; mod combat_system; @@ -84,10 +54,7 @@ fn main() { .add_plugins(DefaultPlugins) .add_plugin(BiomePlugin) .add_systems( - PreStartup, (load_sprites, load_font) - ) - .add_systems( - PreStartup, (load_sprites, load_font) + PreStartup, (load_sprites, load_font, load_sfx) ) // .add_startup_system_to_stage(StartupStage::PreStartup, load_sprites) // .add_startup_system_to_stage(StartupStage::PreStartup, load_font) diff --git a/src/unitgenerator_system.rs b/src/unitgenerator_system.rs index 79adc81..e0b99ff 100644 --- a/src/unitgenerator_system.rs +++ b/src/unitgenerator_system.rs @@ -14,7 +14,7 @@ pub fn spawn_unit_from_template( position: Position, sprite_sheet: &Res, template: &UnitTemplate, -) { +) -> Entity { let sprite = TextureAtlasSprite::new(template.actor_type.sprite_index()); commands .spawn(SpriteSheetBundle { @@ -39,7 +39,7 @@ pub fn spawn_unit_from_template( attributes: template.attributes.clone(), } ) .insert( Brain { ..default() } ) - ; + .id() } pub struct UnitTemplate {