This commit is contained in:
parent
85ca3af12d
commit
f0d690a9f8
2 changed files with 24 additions and 7 deletions
|
@ -11,6 +11,8 @@ use bevy::{
|
|||
use rand::{Rng as _, SeedableRng};
|
||||
use wyrand::WyRand;
|
||||
|
||||
use crate::AppState;
|
||||
|
||||
use super::{
|
||||
objects::{Ball, Player, Radius, Wall},
|
||||
rng::thread_rng,
|
||||
|
@ -21,6 +23,12 @@ const BALL_COUNT: u8 = 32;
|
|||
const BALL_SIZES: Range<f32> = 10.0..25.0;
|
||||
const DIMENSION_SIZES: Range<f32> = 500.0..2000.0;
|
||||
|
||||
pub fn check_for_seed(seed: Option<Res<Seed>>, mut next_state: ResMut<NextState<AppState>>) {
|
||||
if seed.is_some() {
|
||||
next_state.set(AppState::InGame);
|
||||
}
|
||||
}
|
||||
|
||||
/// The size of the playable area (x, y)
|
||||
#[derive(Resource)]
|
||||
pub struct PlayableArea(f32, f32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue