diff --git a/.vscode/settings.json b/.vscode/settings.json index bc89a82..fe117a2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,6 @@ "despawn", "Despawns", "lerp", - "PRNG", "recip", "respawns", "timestep", diff --git a/Cargo.toml b/Cargo.toml index 22b0721..3b6ee1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,5 +37,5 @@ log = { version = "*", features = [ "max_level_debug", "release_max_level_warn", ] } -rand = { version = "0.9.1", default-features = false, features = ["std", "thread_rng"] } +rand = { version = "0.9.1", default-features = false, features = ["std"] } wyrand = "0.3.2" diff --git a/src/game/mod.rs b/src/game/mod.rs index cd239ce..370d386 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -1,5 +1,4 @@ -mod objects; -mod rng; +pub mod objects; pub mod runtime; pub mod seed; pub mod setup; diff --git a/src/game/objects.rs b/src/game/objects.rs index 2fbe122..2ba8d60 100644 --- a/src/game/objects.rs +++ b/src/game/objects.rs @@ -1,22 +1,18 @@ use avian2d::prelude::*; use bevy::prelude::*; -/// Basic implementation of a physics object #[derive(Component, Default)] #[require(Collider, Mesh2d, MeshMaterial2d, Restitution = Restitution::new(1.0), RigidBody, TransformInterpolation, Transform)] struct GameObject; -/// A basic ball with which to interact #[derive(Component, Default)] #[require(GameObject, RigidBody = RigidBody::Dynamic)] pub struct Ball; -/// The controllable ball #[derive(Component, Default)] #[require(Ball)] pub struct Player; -/// The static objects bounding the playable area #[derive(Component, Default)] #[require(GameObject, RigidBody = RigidBody::Static)] pub struct Wall; diff --git a/src/game/rng.rs b/src/game/rng.rs deleted file mode 100644 index b80a739..0000000 --- a/src/game/rng.rs +++ /dev/null @@ -1,7 +0,0 @@ -use rand::random; -use wyrand::WyRand; - -/// Initialize a `WyRand` using `rand`'s thread-local random number generator -pub fn thread_rng() -> WyRand { - WyRand::new(random()) -} diff --git a/src/game/runtime.rs b/src/game/runtime.rs index 664dc49..a0ab185 100644 --- a/src/game/runtime.rs +++ b/src/game/runtime.rs @@ -6,7 +6,6 @@ use bevy::{ use super::objects::Player; -/// Move the player character based on the keyboard input pub fn move_player( time: Res