feat: add scrolling starfield background
Add 150 stars with randomized positions, sizes, speeds, and brightness. Stars scroll downward with parallax depth effect and wrap around at screen edges. Also fixes Bevy 0.13 API issues in game_state.rs (KeyCode::R → KeyR, Input → ButtonInput).
This commit is contained in:
parent
c9188f58f6
commit
9d80626cc6
7 changed files with 72 additions and 6 deletions
|
|
@ -39,3 +39,11 @@ pub const TRACTOR_BEAM_WIDTH: f32 = 20.0;
|
|||
pub const TRACTOR_BEAM_DURATION: f32 = 3.0;
|
||||
pub const TRACTOR_BEAM_COLOR: Color = Color::rgba(0.5, 0.0, 0.8, 0.6);
|
||||
pub const CAPTURE_DURATION: f32 = 10.0; // How long the player stays captured
|
||||
|
||||
// Starfield constants
|
||||
pub const STAR_COUNT: usize = 150;
|
||||
pub const STAR_MIN_SIZE: f32 = 1.0;
|
||||
pub const STAR_MAX_SIZE: f32 = 3.0;
|
||||
pub const STAR_MIN_SPEED: f32 = 20.0;
|
||||
pub const STAR_MAX_SPEED: f32 = 100.0;
|
||||
pub const STAR_Z_DEPTH: f32 = -10.0; // Behind all game entities
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue