Turn on dynamic linking

This commit is contained in:
Yash Karandikar 2022-01-02 19:14:43 -06:00
parent 798f2d491b
commit deb18f852b
Signed by: karx
GPG key ID: A794DA2529474BA5
3 changed files with 15 additions and 2 deletions

10
Cargo.lock generated
View file

@ -196,6 +196,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6b14f8ba7c373fdf7bd27547bb95f2849b2569bf02bbf3d19ca54e9d692de4f"
dependencies = [
"bevy_dylib",
"bevy_internal",
"syn",
]
@ -308,6 +309,15 @@ dependencies = [
"parking_lot",
]
[[package]]
name = "bevy_dylib"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efa62c7c03470969539a07337bf8c5694c0b952678fd081d68b6331842134b85"
dependencies = [
"bevy_internal",
]
[[package]]
name = "bevy_dynamic_plugin"
version = "0.5.0"

View file

@ -5,5 +5,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = "0.5"
[dependencies.bevy]
version = "0.5"
features = ["dynamic"]

View file

@ -38,6 +38,7 @@ fn setup(
commands.spawn_bundle(OrthographicCameraBundle::new_2d());
commands.spawn_bundle(UiCameraBundle::default());
// create the player
state.player.entity = Some(
commands
.spawn_bundle(SpriteBundle {
@ -101,6 +102,7 @@ fn movement(
moved = true;
}
// limit movement of player
game.player.x = game.player.x.min(435).max(-435);
game.player.y = game.player.y.min(285).max(-285);