Compare commits
No commits in common. "b3fe69a4f44e3b60d142c96481fc2d97c2ab7830" and "feab10f9585cd2bb4cfc759bf282c0694c1c2624" have entirely different histories.
b3fe69a4f4
...
feab10f958
|
|
@ -23,9 +23,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ab_glyph"
|
||||
version = "0.2.24"
|
||||
version = "0.2.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e08104bebc65a46f8bc7aa733d39ea6874bfa7156f41a46b805785e3af1587d"
|
||||
checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225"
|
||||
dependencies = [
|
||||
"ab_glyph_rasterizer",
|
||||
"owned_ttf_parser",
|
||||
|
|
@ -197,9 +197,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
|||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.2.0"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
|
|
@ -233,7 +233,7 @@ dependencies = [
|
|||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -302,9 +302,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.6.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
|
||||
checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
|
||||
|
||||
[[package]]
|
||||
name = "calloop"
|
||||
|
|
@ -343,9 +343,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cargo-platform"
|
||||
version = "0.1.8"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc"
|
||||
checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
|
@ -366,9 +366,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.91"
|
||||
version = "1.0.90"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153"
|
||||
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
|
|
@ -423,9 +423,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.4"
|
||||
version = "4.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"
|
||||
checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
|
|
@ -440,19 +440,19 @@ dependencies = [
|
|||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim 0.11.1",
|
||||
"strsim 0.11.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.5.4"
|
||||
version = "4.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"
|
||||
checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -543,9 +543,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
|
|||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
version = "0.23.2"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"
|
||||
checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation",
|
||||
|
|
@ -718,9 +718,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "downcast-rs"
|
||||
version = "1.2.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
|
||||
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
||||
|
||||
[[package]]
|
||||
name = "editor"
|
||||
|
|
@ -864,7 +864,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -939,7 +939,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -984,7 +984,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox"
|
||||
version = "0.33.1"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"fyrox-impl",
|
||||
]
|
||||
|
|
@ -992,7 +992,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-animation"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"fyrox-core",
|
||||
|
|
@ -1004,7 +1004,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-core"
|
||||
version = "0.27.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"android-activity",
|
||||
"arrayvec",
|
||||
|
|
@ -1015,7 +1015,7 @@ dependencies = [
|
|||
"futures",
|
||||
"fxhash",
|
||||
"fyrox-core-derive",
|
||||
"fyrox-math 0.1.0 (git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70)",
|
||||
"fyrox-math 0.1.0 (git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c)",
|
||||
"instant",
|
||||
"js-sys",
|
||||
"lazy_static",
|
||||
|
|
@ -1036,7 +1036,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-core-derive"
|
||||
version = "0.22.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"darling",
|
||||
|
|
@ -1049,7 +1049,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-graph"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"fyrox-core",
|
||||
|
|
@ -1059,7 +1059,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-impl"
|
||||
version = "0.33.1"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitflags 2.5.0",
|
||||
|
|
@ -1090,7 +1090,6 @@ dependencies = [
|
|||
"rayon",
|
||||
"ron",
|
||||
"serde",
|
||||
"serde-wasm-bindgen",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"tbc",
|
||||
|
|
@ -1115,7 +1114,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-math"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"nalgebra",
|
||||
|
|
@ -1127,7 +1126,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-resource"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"fyrox-core",
|
||||
|
|
@ -1140,7 +1139,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-sound"
|
||||
version = "0.34.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"fyrox-core",
|
||||
"fyrox-resource",
|
||||
|
|
@ -1157,7 +1156,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyrox-ui"
|
||||
version = "0.24.0"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"copypasta",
|
||||
"fontdue",
|
||||
|
|
@ -1177,7 +1176,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fyroxed_base"
|
||||
version = "0.20.1"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=7de5a3107da2dfab180fd23f4c79b2542b466d70#7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
source = "git+https://github.com/FyroxEngine/Fyrox?rev=a133cfab0615dae9b18470f4860e81363df2bd1c#a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
dependencies = [
|
||||
"cargo_metadata",
|
||||
"fyrox",
|
||||
|
|
@ -1204,9 +1203,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.13"
|
||||
version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6"
|
||||
checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
|
|
@ -1321,9 +1320,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "2.4.1"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
|
||||
checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crunchy",
|
||||
|
|
@ -1409,9 +1408,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.2.6"
|
||||
version = "2.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
|
||||
checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
|
|
@ -1488,9 +1487,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.11"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
|
||||
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
|
||||
|
||||
[[package]]
|
||||
name = "jni"
|
||||
|
|
@ -1575,9 +1574,6 @@ name = "lazy_static"
|
|||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
dependencies = [
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazycell"
|
||||
|
|
@ -1686,9 +1682,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.2"
|
||||
version = "2.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
|
||||
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
|
|
@ -1701,9 +1697,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.9.1"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
||||
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
|
@ -1738,9 +1734,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nalgebra"
|
||||
version = "0.32.5"
|
||||
version = "0.32.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef"
|
||||
checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"matrixmultiply",
|
||||
|
|
@ -1851,7 +1847,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1912,7 +1908,7 @@ dependencies = [
|
|||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2035,9 +2031,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "parry2d"
|
||||
version = "0.13.7"
|
||||
version = "0.13.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a996b83a7a12522b395c54f4ba59593b782e8004794c0212a2f487ed7ac6e419"
|
||||
checksum = "94683d8d7e785fe84b02d0a0dbe0fcf359c031c338dd6d144de958573c570c25"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"arrayvec",
|
||||
|
|
@ -2056,9 +2052,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "parry3d"
|
||||
version = "0.13.7"
|
||||
version = "0.13.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ccba18a65dba56c08dadfa936e0c9efbc883b3a26dc77d2685f78be10f7667c"
|
||||
checksum = "13d0bdaf533851feec5cba9af11cefcc753ecefba05f758cf6abe886086bc3f5"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"arrayvec",
|
||||
|
|
@ -2095,9 +2091,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
|||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.14"
|
||||
version = "0.2.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
|
||||
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
|
|
@ -2116,7 +2112,6 @@ name = "platformer"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fyrox",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2134,13 +2129,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "polling"
|
||||
version = "3.6.0"
|
||||
version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6"
|
||||
checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"hermit-abi",
|
||||
"pin-project-lite",
|
||||
"rustix",
|
||||
"tracing",
|
||||
|
|
@ -2288,9 +2282,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.10.0"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
||||
checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
|
||||
dependencies = [
|
||||
"either",
|
||||
"rayon-core",
|
||||
|
|
@ -2346,9 +2340,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.10.4"
|
||||
version = "1.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
|
||||
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
|
|
@ -2369,9 +2363,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.3"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
|
||||
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
|
||||
[[package]]
|
||||
name = "robust"
|
||||
|
|
@ -2445,9 +2439,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.15"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47"
|
||||
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
|
|
@ -2516,17 +2510,6 @@ dependencies = [
|
|||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde-wasm-bindgen"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"serde",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.197"
|
||||
|
|
@ -2535,14 +2518,14 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.115"
|
||||
version = "1.0.114"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
|
||||
checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
|
|
@ -2664,12 +2647,6 @@ dependencies = [
|
|||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spin"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
||||
|
||||
[[package]]
|
||||
name = "strength_reduce"
|
||||
version = "0.2.4"
|
||||
|
|
@ -2690,9 +2667,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
|
||||
|
||||
[[package]]
|
||||
name = "strum"
|
||||
|
|
@ -2710,7 +2687,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2726,9 +2703,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.58"
|
||||
version = "2.0.53"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687"
|
||||
checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -2773,7 +2750,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3009,7 +2986,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
|
@ -3043,7 +3020,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
|
@ -3565,9 +3542,9 @@ checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621"
|
|||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.8.20"
|
||||
version = "0.8.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193"
|
||||
checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
|
|
@ -3586,5 +3563,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
"syn 2.0.53",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ resolver = "2"
|
|||
|
||||
[workspace.dependencies.fyrox]
|
||||
git = "https://github.com/FyroxEngine/Fyrox"
|
||||
rev = "7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
rev = "a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
|
||||
[workspace.dependencies.fyroxed_base]
|
||||
git = "https://github.com/FyroxEngine/Fyrox"
|
||||
rev = "7de5a3107da2dfab180fd23f4c79b2542b466d70"
|
||||
rev = "a133cfab0615dae9b18470f4860e81363df2bd1c"
|
||||
|
||||
# Optimize the engine in debug builds, but leave project's code non-optimized.
|
||||
# By using this technique, you can still debug you code, but engine will be fully
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 211 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 341 KiB |
Binary file not shown.
BIN
data/menu.ui
BIN
data/menu.ui
Binary file not shown.
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, height=device-height, width=device-width, initial-scale=1.0">
|
||||
|
|
@ -8,45 +7,11 @@
|
|||
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<script type="module" defer src="main.js"></script>
|
||||
<!-- Yandex.Metrika counter -->
|
||||
<script type="text/javascript">
|
||||
(function (m, e, t, r, i, k, a) {
|
||||
m[i] = m[i] || function () { (m[i].a = m[i].a || []).push(arguments) };
|
||||
m[i].l = 1 * new Date();
|
||||
for (var j = 0; j < document.scripts.length; j++) { if (document.scripts[j].src === r) { return; } }
|
||||
k = e.createElement(t), a = e.getElementsByTagName(t)[0], k.async = 1, k.src = r, a.parentNode.insertBefore(k, a)
|
||||
})
|
||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||
|
||||
ym(96918237, "init", {
|
||||
clickmap: true,
|
||||
trackLinks: true,
|
||||
accurateTrackBounce: true
|
||||
});
|
||||
</script>
|
||||
<noscript>
|
||||
<div><img src="https://mc.yandex.ru/watch/96918237" style="position:absolute; left:-9999px;" alt="" /></div>
|
||||
</noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>This page contains WebAssembly and JavaScript content, please enable JavaScript in your browser.</noscript>
|
||||
<div class="lds-default" style="display: none;">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="lds-default" style="display: none;"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
|
||||
|
||||
<main id="main">
|
||||
<button class="button-3d" id="button-start" type="button" role="button" onclick="preloaderEnable()">
|
||||
|
|
@ -77,13 +42,10 @@
|
|||
function resize(canvasObj) {
|
||||
document.querySelector('.lds-default').style.display = "none";
|
||||
canvasObj.style = null;
|
||||
canvasObj.width = document.body.scrollWidth * window.devicePixelRatio;
|
||||
canvasObj.height = document.body.scrollHeight * window.devicePixelRatio;
|
||||
canvasObj.style.width = document.body.scrollWidth + "px";
|
||||
canvasObj.style.height = document.body.scrollHeight + "px";
|
||||
canvasObj.width = window.screen.width * window.devicePixelRatio;
|
||||
canvasObj.height = window.screen.height * window.devicePixelRatio;
|
||||
canvasObj.style.width = window.screen.width + "px";
|
||||
canvasObj.style.height = window.screen.widheightth + "px";
|
||||
}
|
||||
vkBridge.send("VKWebAppInit", {});
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
|
|
@ -12,13 +12,13 @@ export interface InitOutput {
|
|||
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
||||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
||||
readonly __wbindgen_export_2: WebAssembly.Table;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2ac5caa64f614f2e: (a: number, b: number, c: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut__A_B___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc170cf40329e6731: (a: number, b: number, c: number, d: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfe38bb7ac4b6df42: (a: number, b: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2cce366d7e1ef568: (a: number, b: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf758f2f68df3f963: (a: number, b: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03c62e575fdfe974: (a: number, b: number, c: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha401fff11c774e91: (a: number, b: number, c: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke1_mut__h7977a475161f720f: (a: number, b: number, c: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke0_mut__h9cfe64ae8a53b273: (a: number, b: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke2_mut__hba3c5a1b4df3b13d: (a: number, b: number, c: number, d: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke0_mut__hc321ab21773f28ba: (a: number, b: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke1_mut__h0f1d8e7262983e79: (a: number, b: number, c: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke0_mut__h79d5b69c906304b3: (a: number, b: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4d122b4606e1c898: (a: number, b: number, c: number) => void;
|
||||
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
||||
readonly __wbindgen_exn_store: (a: number) => void;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -5,12 +5,12 @@ export function main(): void;
|
|||
export function __wbindgen_malloc(a: number, b: number): number;
|
||||
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
||||
export const __wbindgen_export_2: WebAssembly.Table;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2ac5caa64f614f2e(a: number, b: number, c: number): void;
|
||||
export function _dyn_core__ops__function__FnMut__A_B___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc170cf40329e6731(a: number, b: number, c: number, d: number): void;
|
||||
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfe38bb7ac4b6df42(a: number, b: number): void;
|
||||
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2cce366d7e1ef568(a: number, b: number): void;
|
||||
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf758f2f68df3f963(a: number, b: number): void;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h03c62e575fdfe974(a: number, b: number, c: number): void;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha401fff11c774e91(a: number, b: number, c: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke1_mut__h7977a475161f720f(a: number, b: number, c: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke0_mut__h9cfe64ae8a53b273(a: number, b: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke2_mut__hba3c5a1b4df3b13d(a: number, b: number, c: number, d: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke0_mut__hc321ab21773f28ba(a: number, b: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke1_mut__h0f1d8e7262983e79(a: number, b: number, c: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke0_mut__h79d5b69c906304b3(a: number, b: number): void;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4d122b4606e1c898(a: number, b: number, c: number): void;
|
||||
export function __wbindgen_free(a: number, b: number, c: number): void;
|
||||
export function __wbindgen_exn_store(a: number): void;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,3 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
fyrox = {workspace = true}
|
||||
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
|
||||
|
|
@ -48,7 +48,6 @@ const ATTACK_SPEED: f32 = 1.0;
|
|||
const SUPER_DAMAGE: f32 = 30.0;
|
||||
const SUPER_ATTACK_SPEED: f32 = 0.3;
|
||||
const MOAN_TIME: f32 = 3.1;
|
||||
const PAUSE_TO_NEXT_LEVEL: f32 = 1.0;
|
||||
|
||||
#[derive(Visit, Reflect, Debug, Clone, Default)]
|
||||
pub struct Archer {
|
||||
|
|
@ -210,7 +209,7 @@ impl Archer {
|
|||
return;
|
||||
}
|
||||
self.fight = false;
|
||||
player_script.take_damage(&damage, ctx.elapsed_time);
|
||||
player_script.take_damage(&damage);
|
||||
}
|
||||
|
||||
fn get_player_position(&self, context: &mut ScriptContext) -> Vector3<f32> {
|
||||
|
|
@ -503,7 +502,7 @@ impl ScriptTrait for Archer {
|
|||
if self.intersections_box(&mut context.scene.graph) {
|
||||
self.dead = true;
|
||||
let game = context.plugins.get_mut::<Game>();
|
||||
game.next_level(context.elapsed_time + PAUSE_TO_NEXT_LEVEL);
|
||||
game.next_level();
|
||||
return;
|
||||
}
|
||||
self.set_fight(context);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ const SPEED: f32 = 3.1;
|
|||
const DAMAGE: f32 = 100.0;
|
||||
const ATTACK_SPEED: f32 = 0.1;
|
||||
const MOAN_TIME: f32 = 3.1;
|
||||
const PAUSE_TO_NEXT_LEVEL: f32 = 1.0;
|
||||
|
||||
#[derive(Visit, Reflect, Debug, Clone, Default)]
|
||||
pub struct Swordman {
|
||||
|
|
@ -208,7 +207,7 @@ impl Swordman {
|
|||
return;
|
||||
}
|
||||
self.block = false;
|
||||
player_script.take_damage(&self.attack_damage, ctx.elapsed_time);
|
||||
player_script.take_damage(&self.attack_damage);
|
||||
}
|
||||
|
||||
fn get_player_position(&self, context: &mut ScriptContext) -> Vector3<f32> {
|
||||
|
|
@ -501,7 +500,7 @@ impl ScriptTrait for Swordman {
|
|||
if self.intersections_box(&mut context.scene.graph) {
|
||||
self.dead = true;
|
||||
let game = context.plugins.get_mut::<Game>();
|
||||
game.next_level(context.elapsed_time + PAUSE_TO_NEXT_LEVEL);
|
||||
game.next_level();
|
||||
return;
|
||||
}
|
||||
self.set_fight(context);
|
||||
|
|
|
|||
148
game/src/lib.rs
148
game/src/lib.rs
|
|
@ -1,5 +1,4 @@
|
|||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
//! Game project.
|
||||
use fyrox::core::color::Color;
|
||||
use fyrox::graph::SceneGraph;
|
||||
use fyrox::gui::Thickness;
|
||||
|
|
@ -13,15 +12,15 @@ use fyrox::{
|
|||
engine::GraphicsContext,
|
||||
event::{Event, WindowEvent},
|
||||
gui::{
|
||||
font::Font,
|
||||
brush::Brush,
|
||||
button::ButtonMessage,
|
||||
font::Font,
|
||||
grid::{Column, GridBuilder, Row},
|
||||
message::{MessageDirection, UiMessage},
|
||||
text::TextBuilder,
|
||||
widget::WidgetBuilder,
|
||||
widget::WidgetMessage,
|
||||
UiNode, UserInterface, UiContainer,
|
||||
UiNode, UserInterface,
|
||||
},
|
||||
keyboard::{KeyCode, PhysicalKey},
|
||||
plugin::{Plugin, PluginContext},
|
||||
|
|
@ -63,23 +62,18 @@ pub struct Game {
|
|||
scene: Handle<Scene>,
|
||||
|
||||
new_game: Handle<UiNode>,
|
||||
new_game_with_plot: Handle<UiNode>,
|
||||
next: Handle<UiNode>,
|
||||
new_game_after_plot: Handle<UiNode>,
|
||||
exit: Handle<UiNode>,
|
||||
level_node: Handle<UiNode>,
|
||||
level: u32,
|
||||
need_change_level: bool,
|
||||
need_show_menu: bool,
|
||||
show_menu_time: f32,
|
||||
change_level_time: f32,
|
||||
need_show_end: bool,
|
||||
}
|
||||
|
||||
impl Game {
|
||||
|
||||
pub fn default() -> Self {
|
||||
return Game {
|
||||
level: START_LEVEL,
|
||||
level: 1,
|
||||
..Default::default()
|
||||
};
|
||||
}
|
||||
|
|
@ -89,29 +83,15 @@ impl Game {
|
|||
UserInterface::load_from_file("data/menu.ui", ctx.resource_manager.clone()),
|
||||
|result, game: &mut Game, ctx| match result {
|
||||
Ok(menu) => {
|
||||
let mut ui_container = UiContainer::new();
|
||||
ui_container.add(menu);
|
||||
*ctx.user_interfaces = ui_container;
|
||||
*ctx.user_interface = menu;
|
||||
(game.new_game, _) = ctx
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.find_by_name_from_root("NewGame")
|
||||
.unwrap();
|
||||
(game.new_game_with_plot, _) = ctx
|
||||
.user_interfaces.first()
|
||||
.find_by_name_from_root("NewGameWithPlot")
|
||||
.unwrap();
|
||||
(game.next, _) = ctx
|
||||
.user_interfaces.first()
|
||||
.find_by_name_from_root("NextPlotScreen")
|
||||
.unwrap();
|
||||
(game.new_game_after_plot, _) = ctx
|
||||
.user_interfaces.first()
|
||||
.find_by_name_from_root("NewGamePlotScreen")
|
||||
.unwrap();
|
||||
(game.exit, _) = ctx.user_interfaces.first().find_by_name_from_root("Exit").unwrap();
|
||||
(game.exit, _) = ctx.user_interface.find_by_name_from_root("Exit").unwrap();
|
||||
}
|
||||
Err(e) => Log::err(format!("Unable to load main menu! Reason: {:?}", e)),
|
||||
// let ui = ctx.user_interfaces.clone();
|
||||
// let ui = ctx.user_interface.clone();
|
||||
// *ui = result.unwrap();
|
||||
},
|
||||
);
|
||||
|
|
@ -120,39 +100,25 @@ impl Game {
|
|||
level_node: Handle::NONE,
|
||||
scene: Handle::NONE,
|
||||
new_game: Handle::NONE,
|
||||
new_game_with_plot: Handle::NONE,
|
||||
new_game_after_plot: Handle::NONE,
|
||||
next: Handle::NONE,
|
||||
exit: Handle::NONE,
|
||||
level: START_LEVEL,
|
||||
need_change_level: false,
|
||||
need_show_menu: false,
|
||||
need_show_end: false,
|
||||
show_menu_time: 0.0,
|
||||
change_level_time: 0.0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next_level(&mut self, change_level_time: f32) {
|
||||
pub fn next_level(&mut self) {
|
||||
self.need_change_level = true;
|
||||
self.change_level_time = change_level_time;
|
||||
}
|
||||
|
||||
pub fn show_menu(&mut self, show_menu_time: f32) {
|
||||
self.show_menu_time = show_menu_time;
|
||||
pub fn show_menu(&mut self) {
|
||||
self.need_show_menu = true;
|
||||
}
|
||||
|
||||
pub fn end_game(&mut self) {
|
||||
self.need_show_end = true;
|
||||
}
|
||||
}
|
||||
|
||||
impl Plugin for Game {
|
||||
fn register(
|
||||
&self,
|
||||
#[allow(unused_variables)] context: fyrox::plugin::PluginRegistrationContext,
|
||||
) {
|
||||
|
||||
fn register(&self, #[allow(unused_variables)] context: fyrox::plugin::PluginRegistrationContext) {
|
||||
let script_constructors = &context.serialization_context.script_constructors;
|
||||
script_constructors.add::<Swordman>("Enemy");
|
||||
script_constructors.add::<Player>("Player");
|
||||
|
|
@ -168,38 +134,23 @@ impl Plugin for Game {
|
|||
}
|
||||
|
||||
fn update(&mut self, context: &mut PluginContext) {
|
||||
if self.need_change_level && self.change_level_time < context.elapsed_time {
|
||||
if self.need_change_level {
|
||||
self.need_change_level = false;
|
||||
self.level += 1;
|
||||
context.async_scene_loader.request("data/scene.rgs");
|
||||
}
|
||||
|
||||
//println!("{} {} ", context.elapsed_time, self.show_menu_time);
|
||||
if self.need_show_menu && self.show_menu_time < context.elapsed_time {
|
||||
if self.need_show_menu {
|
||||
self.need_show_menu = false;
|
||||
self.show_menu_time = 0.0;
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.send_message(WidgetMessage::visibility(
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.find_handle_by_name_from_root("MenuScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
true,
|
||||
));
|
||||
}
|
||||
|
||||
if self.need_show_end {
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.send_message(WidgetMessage::visibility(
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.find_handle_by_name_from_root("EndScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
fn on_os_event(&mut self, event: &Event<()>, context: PluginContext) {
|
||||
|
|
@ -208,10 +159,10 @@ impl Plugin for Game {
|
|||
if let PhysicalKey::Code(keycode) = event.physical_key {
|
||||
if keycode == KeyCode::Escape {
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.send_message(WidgetMessage::visibility(
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.find_handle_by_name_from_root("MenuScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
true,
|
||||
|
|
@ -249,46 +200,14 @@ impl Plugin for Game {
|
|||
|
||||
fn on_ui_message(&mut self, ctx: &mut PluginContext, message: &UiMessage) {
|
||||
if let Some(ButtonMessage::Click) = message.data() {
|
||||
if message.destination() == self.new_game || message.destination() == self.new_game_after_plot {
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces.first()
|
||||
.find_handle_by_name_from_root("Start2Screen"),
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
));
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces
|
||||
.first().find_handle_by_name_from_root("MenuScreen"),
|
||||
if message.destination() == self.new_game {
|
||||
ctx.user_interface.send_message(WidgetMessage::visibility(
|
||||
ctx.user_interface
|
||||
.find_handle_by_name_from_root("MenuScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
));
|
||||
ctx.async_scene_loader.request("data/scene.rgs");
|
||||
} else if message.destination() == self.new_game_with_plot {
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces
|
||||
.first().find_handle_by_name_from_root("MenuScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
));
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces
|
||||
.first().find_handle_by_name_from_root("StartScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
true,
|
||||
));
|
||||
} else if message.destination() == self.next {
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces
|
||||
.first().find_handle_by_name_from_root("StartScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
));
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interfaces
|
||||
.first().find_handle_by_name_from_root("Start2Screen"),
|
||||
MessageDirection::ToWidget,
|
||||
true,
|
||||
));
|
||||
} else if message.destination() == self.exit {
|
||||
if let Some(window_target) = ctx.window_target {
|
||||
window_target.exit();
|
||||
|
|
@ -301,7 +220,7 @@ impl Plugin for Game {
|
|||
if self.scene.is_some() {
|
||||
ctx.scenes.remove(self.scene);
|
||||
}
|
||||
ctx.user_interfaces.first().send_message(WidgetMessage::visibility(
|
||||
ctx.user_interface.send_message(WidgetMessage::visibility(
|
||||
self.level_node,
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
|
|
@ -316,10 +235,10 @@ impl Plugin for Game {
|
|||
context: &mut PluginContext,
|
||||
) {
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.send_message(WidgetMessage::visibility(
|
||||
context
|
||||
.user_interfaces.first()
|
||||
.user_interface
|
||||
.find_handle_by_name_from_root("MenuScreen"),
|
||||
MessageDirection::ToWidget,
|
||||
false,
|
||||
|
|
@ -337,23 +256,18 @@ impl Plugin for Game {
|
|||
if self.level == 2 {
|
||||
ArcherSpawn::new().spawn_enemy(graph, resource_manager, -25.0);
|
||||
}
|
||||
let ui_ctx = &mut context.user_interfaces.first_mut().build_ctx();
|
||||
let font_to_level =
|
||||
resource_manager.request::<Font>("data/cd2f1-36d91_sunday.ttf".to_owned());
|
||||
let ui_ctx = &mut context.user_interface.build_ctx();
|
||||
let font_to_level = resource_manager.request::<Font>("data/cd2f1-36d91_sunday.ttf".to_owned());
|
||||
self.level_node = GridBuilder::new(
|
||||
WidgetBuilder::new()
|
||||
.with_child(
|
||||
TextBuilder::new(
|
||||
WidgetBuilder::new()
|
||||
.with_foreground(Brush::Solid(Color::opaque(192, 34, 9))),
|
||||
)
|
||||
WidgetBuilder::new().with_child(
|
||||
TextBuilder::new(WidgetBuilder::new().with_foreground(Brush::Solid(Color::opaque(192, 34, 9))))
|
||||
.with_text(format!("Уровень: {}", self.level))
|
||||
.with_font_size(20.0)
|
||||
.with_font(font_to_level)
|
||||
.with_shadow_brush(Brush::Solid(Color::RED))
|
||||
.build(ui_ctx),
|
||||
)
|
||||
.with_margin(Thickness::top_left(10.0)),
|
||||
.with_margin(Thickness::top_left(10.0))
|
||||
)
|
||||
.add_row(Row::stretch())
|
||||
.add_column(Column::auto())
|
||||
|
|
|
|||
|
|
@ -206,20 +206,22 @@ fn build_stone_block(resource_manager: &ResourceManager, graph: &mut Graph, x: f
|
|||
)
|
||||
}
|
||||
|
||||
fn build_home_block(resource_manager: &ResourceManager, graph: &mut Graph, x: f32, y: f32) {
|
||||
let shape = ColliderShape::Cuboid(CuboidShape::default());
|
||||
build_block(
|
||||
graph,
|
||||
x as f32,
|
||||
y + 1.7,
|
||||
3.,
|
||||
build_material(
|
||||
resource_manager,
|
||||
"assets/data/objects/Home.png".to_owned(),
|
||||
),
|
||||
shape,
|
||||
)
|
||||
}
|
||||
// fn build_mushroom_block(resource_manager: &ResourceManager, graph: &mut Graph, x: f32, y: f32) {
|
||||
// let shape = ColliderShape::Cuboid(CuboidShape {
|
||||
// half_extents: Vector2::new(0.25, 0.25),
|
||||
// });
|
||||
// build_block(
|
||||
// graph,
|
||||
// x as f32,
|
||||
// y + 0.5,
|
||||
// 0.5,
|
||||
// build_material(
|
||||
// resource_manager,
|
||||
// "assets/data/objects/Mushroom_2.png".to_owned(),
|
||||
// ),
|
||||
// shape,
|
||||
// )
|
||||
// }
|
||||
|
||||
fn build_box_block(resource_manager: &ResourceManager, graph: &mut Graph, x: f32, y: f32) {
|
||||
let shape = ColliderShape::Cuboid(CuboidShape::default());
|
||||
|
|
@ -248,12 +250,8 @@ pub fn build_map(graph: &mut Graph, resource_manager: &ResourceManager, level: u
|
|||
build_ground_block(resource_manager, graph, x as f32, bottom_y);
|
||||
}
|
||||
build_stone_block(resource_manager, graph, 30.0, bottom_y);
|
||||
if level == 3 {
|
||||
build_home_block(resource_manager, graph, -40.0, bottom_y);
|
||||
} else {
|
||||
build_stone_block(resource_manager, graph, -30.0, bottom_y);
|
||||
}
|
||||
build_tree_block(resource_manager, graph, 35.0, bottom_y);
|
||||
build_stone_block(resource_manager, graph, -30.0, bottom_y);
|
||||
if level != 3 {
|
||||
build_tree_block(resource_manager, graph, -35.0, bottom_y);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ pub enum ScreenSizeMessage {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum SoundMessage {
|
||||
PlayerWalk,
|
||||
PlayerJump,
|
||||
|
|
@ -20,4 +20,3 @@ pub enum SoundMessage {
|
|||
SkeletonMoan,
|
||||
Bones,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ use fyrox::{
|
|||
|
||||
const JUMP_HEIGHT: f32 = 6.0;
|
||||
const SPEED: f32 = 2.9;
|
||||
const ONE_SEC: f32 = 1.0;
|
||||
const END_MAP: f32 = -36.5;
|
||||
|
||||
#[derive(Visit, Reflect, Debug, Default, Clone)]
|
||||
pub struct Player {
|
||||
|
|
@ -63,9 +61,6 @@ pub struct Player {
|
|||
// Health Bar
|
||||
max_health: f32,
|
||||
health: f32,
|
||||
#[reflect(hidden)]
|
||||
#[visit(skip)]
|
||||
time_dead: f32,
|
||||
health_bar_background: Handle<Node>,
|
||||
health_bar_progress: Handle<Node>,
|
||||
}
|
||||
|
|
@ -170,14 +165,11 @@ impl Player {
|
|||
self.health_bar_progress = health_bar_progress;
|
||||
}
|
||||
|
||||
pub fn take_damage(&mut self, damage: &f32, time_damage: f32) {
|
||||
pub fn take_damage(&mut self, damage: &f32) {
|
||||
if self.health == 0.0 {
|
||||
return;
|
||||
}
|
||||
self.health -= damage;
|
||||
if self.health <= 0.0 {
|
||||
self.time_dead = time_damage;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_health(&self) -> f32 {
|
||||
|
|
@ -451,9 +443,9 @@ impl Player {
|
|||
}
|
||||
health_bar_transform.set_position(Vector3::new(nex_x, d.y, d.z));
|
||||
}
|
||||
if self.health <= 0.0 && self.time_dead + ONE_SEC >= context.elapsed_time {
|
||||
if self.health <= 0.0 {
|
||||
let game = context.plugins.get_mut::<Game>();
|
||||
game.show_menu(context.elapsed_time + 3.0);
|
||||
game.show_menu();
|
||||
context.message_sender.send_global(SoundMessage::Lose);
|
||||
}
|
||||
}
|
||||
|
|
@ -495,16 +487,6 @@ impl Player {
|
|||
None => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn check_is_home(&self, context: &mut ScriptContext) {
|
||||
let rigid_body = context.scene.graph[context.handle].cast::<RigidBody>();
|
||||
if let Some(rigid_data) = rigid_body {
|
||||
if rigid_data.local_transform().position().x <= END_MAP {
|
||||
let game = context.plugins.get_mut::<Game>();
|
||||
game.end_game();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl_component_provider!(Player,);
|
||||
|
|
@ -537,7 +519,6 @@ impl ScriptTrait for Player {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Called whenever there is an event from OS (mouse click, keypress, etc.)
|
||||
fn on_os_event(&mut self, event: &Event<()>, _context: &mut ScriptContext) {
|
||||
if let Event::WindowEvent { event, .. } = event {
|
||||
|
|
@ -595,6 +576,5 @@ impl ScriptTrait for Player {
|
|||
self.update_health(context);
|
||||
self.attack_enemy(context);
|
||||
self.loop_over(context);
|
||||
self.check_is_home(context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ use fyrox::{
|
|||
},
|
||||
script::{ScriptContext, ScriptMessageContext, ScriptMessagePayload, ScriptTrait},
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Visit, Reflect, Debug, Default, Clone)]
|
||||
pub struct Sound {
|
||||
|
|
@ -31,27 +30,6 @@ pub struct Sound {
|
|||
win: Handle<Node>,
|
||||
}
|
||||
|
||||
|
||||
|
||||
lazy_static! {
|
||||
static ref SOUNDS_NAMES: HashMap<SoundMessage, String> = {
|
||||
let mut m = HashMap::new();
|
||||
m.insert(SoundMessage::PlayerWalk, "player_walk.ogg".to_owned());
|
||||
m.insert(SoundMessage::PlayerJump, "distance-jump-sound.ogg".to_owned());
|
||||
m.insert(SoundMessage::EnemyWalk, "skeleton_walk.ogg".to_owned());
|
||||
m.insert(SoundMessage::PlayerAttack, "player_sword.ogg".to_owned());
|
||||
m.insert(SoundMessage::SkeletonAttack, "skeleton_sword.ogg".to_owned());
|
||||
m.insert(SoundMessage::ArcherBowAttack, "bow-arrow.ogg".to_owned());
|
||||
m.insert(SoundMessage::ArcherKnifeAttack, "knife.ogg".to_owned());
|
||||
m.insert(SoundMessage::Lose, "lose.ogg".to_owned());
|
||||
m.insert(SoundMessage::Win, "win.ogg".to_owned());
|
||||
m.insert(SoundMessage::SkeletonMoan, "skeleton-woke-up.ogg".to_owned());
|
||||
m.insert(SoundMessage::Bones, "the-bone-of-the-skeleton-moves.ogg".to_owned());
|
||||
m
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
const FAST_SPEED: f64 = 2.0;
|
||||
const NORMAL_SPEED: f64 = 1.0;
|
||||
const LOW_GAIN: f32 = 0.1;
|
||||
|
|
@ -65,16 +43,9 @@ impl Sound {
|
|||
RigidBodyBuilder::new(BaseBuilder::new().with_script(sound)).build(graph);
|
||||
}
|
||||
|
||||
fn new_sound(
|
||||
&self,
|
||||
ctx: &mut ScriptMessageContext,
|
||||
sound_type: SoundMessage,
|
||||
pitch: f64,
|
||||
gain: f32,
|
||||
) -> Handle<Node> {
|
||||
let name = SOUNDS_NAMES.get(&sound_type).unwrap().clone();
|
||||
fn new_sound(&self, ctx: &mut ScriptMessageContext, name: &str, pitch: f64, gain: f32) -> Handle<Node> {
|
||||
let mut path = "assets/data/sounds/".to_owned();
|
||||
path.push_str(&name);
|
||||
path.push_str(name);
|
||||
let walk_sound = ctx.resource_manager.request::<SoundBuffer>(path);
|
||||
return SoundBuilder::new(BaseBuilder::new())
|
||||
.with_buffer(Some(walk_sound))
|
||||
|
|
@ -85,14 +56,7 @@ impl Sound {
|
|||
.build(&mut ctx.scene.graph);
|
||||
}
|
||||
|
||||
fn play_sound(
|
||||
&self,
|
||||
ctx: &mut ScriptMessageContext,
|
||||
sound_type: SoundMessage,
|
||||
handle: Handle<Node>,
|
||||
pitch: f64,
|
||||
gain: f32,
|
||||
) -> Option<Handle<Node>> {
|
||||
fn play_sound(&self, ctx: &mut ScriptMessageContext, name: &str, handle: Handle<Node>, pitch: f64, gain: f32) -> Option<Handle<Node>> {
|
||||
let sound_body = ctx.scene.graph.try_get_mut(handle);
|
||||
if let Some(sound) = sound_body {
|
||||
if sound.as_sound().status() == Status::Stopped {
|
||||
|
|
@ -100,7 +64,7 @@ impl Sound {
|
|||
}
|
||||
return None;
|
||||
}
|
||||
return Some(self.new_sound(ctx, sound_type, pitch, gain));
|
||||
return Some(self.new_sound(ctx, name, pitch, gain));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,14 +72,10 @@ impl_component_provider!(Sound,);
|
|||
|
||||
impl ScriptTrait for Sound {
|
||||
// Called once at initialization.
|
||||
fn on_init(&mut self, context: &mut ScriptContext) {
|
||||
for (_, val) in SOUNDS_NAMES.iter() {
|
||||
let mut path = "assets/data/sounds/".to_owned();
|
||||
path.push_str(val);
|
||||
context
|
||||
.resource_manager
|
||||
.request::<SoundBuffer>(path);
|
||||
}
|
||||
fn on_init(&mut self, _context: &mut ScriptContext) {
|
||||
// context
|
||||
// .resource_manager
|
||||
// .request::<SoundBuffer>("/mnt/23154027-2dd3-43ea-93f1-02a8df7a3c5a/projects/fyrox/platformer/assets/data/sounds/player_walk.ogg");
|
||||
}
|
||||
|
||||
// Put start logic - it is called when every other script is already initialized.
|
||||
|
|
@ -131,115 +91,57 @@ impl ScriptTrait for Sound {
|
|||
ctx: &mut ScriptMessageContext,
|
||||
) {
|
||||
if let Some(SoundMessage::PlayerWalk) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::PlayerWalk,
|
||||
self.player_walk,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "player_walk.ogg", self.player_walk, FAST_SPEED, LOW_GAIN) {
|
||||
self.player_walk = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::EnemyWalk) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::EnemyWalk,
|
||||
self.skeleton_walk,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "skeleton_walk.ogg", self.skeleton_walk, FAST_SPEED, LOW_GAIN) {
|
||||
self.skeleton_walk = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::PlayerAttack) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::PlayerAttack,
|
||||
self.player_attack,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "player_sword.ogg", self.player_attack, FAST_SPEED, LOW_GAIN) {
|
||||
self.player_attack = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::SkeletonAttack) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::SkeletonAttack,
|
||||
self.skeleton_attack,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "skeleton_sword.ogg", self.skeleton_attack, FAST_SPEED, LOW_GAIN) {
|
||||
self.skeleton_attack = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::ArcherBowAttack) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::ArcherBowAttack,
|
||||
self.archer_bow_attack,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "bow-arrow.ogg", self.archer_bow_attack, FAST_SPEED, LOW_GAIN) {
|
||||
self.archer_bow_attack = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::ArcherKnifeAttack) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::ArcherKnifeAttack,
|
||||
self.archer_knife_attack,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "skeleton_sword.ogg", self.archer_knife_attack, FAST_SPEED, LOW_GAIN) {
|
||||
self.archer_knife_attack = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::Lose) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) =
|
||||
self.play_sound(ctx, SoundMessage::Lose, self.lose, NORMAL_SPEED, NORMAL_GAIN)
|
||||
{
|
||||
if let Some(sound) = self.play_sound(ctx, "lose.ogg", self.lose, NORMAL_SPEED, NORMAL_GAIN) {
|
||||
self.lose = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::PlayerJump) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::PlayerJump,
|
||||
self.player_jump,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "distance-jump-sound.ogg", self.player_jump, FAST_SPEED, LOW_GAIN) {
|
||||
self.player_jump = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::Win) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) =
|
||||
self.play_sound(ctx, SoundMessage::Win, self.win, NORMAL_SPEED, NORMAL_GAIN)
|
||||
{
|
||||
if let Some(sound) = self.play_sound(ctx, "win.ogg", self.win, NORMAL_SPEED, NORMAL_GAIN) {
|
||||
self.win = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::SkeletonMoan) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::SkeletonMoan,
|
||||
self.skeleton_moan,
|
||||
FAST_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "skeleton-woke-up.ogg", self.skeleton_moan, FAST_SPEED, LOW_GAIN) {
|
||||
self.skeleton_moan = sound;
|
||||
}
|
||||
}
|
||||
if let Some(SoundMessage::Bones) = message.downcast_ref::<SoundMessage>() {
|
||||
if let Some(sound) = self.play_sound(
|
||||
ctx,
|
||||
SoundMessage::Bones,
|
||||
self.archer_moan,
|
||||
NORMAL_SPEED,
|
||||
LOW_GAIN,
|
||||
) {
|
||||
if let Some(sound) = self.play_sound(ctx, "the-bone-of-the-skeleton-moves.ogg", self.archer_moan, NORMAL_SPEED, LOW_GAIN) {
|
||||
self.archer_moan = sound;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1349
settings.ron
1349
settings.ron
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue