const for balls
This commit is contained in:
parent
5749e0a9d0
commit
97cf8adb4f
2 changed files with 7 additions and 2 deletions
|
|
@ -6,8 +6,13 @@ pub const CENTER_Y: f32 = 0.0;
|
|||
|
||||
// pub const FACTOR_RADIUS: f32 = FACTOR as f32 / 2.0;
|
||||
|
||||
// основная размерность и масштаб
|
||||
pub const SCALE: f32 = 1.0;
|
||||
pub const STEP: f32 = FACTOR as f32 / SCALE;
|
||||
pub const SCALE: f32 = 2.0;
|
||||
|
||||
// зависимые размеры
|
||||
pub const ROUND_BALL_SIZE: f32 = STEP;
|
||||
pub const BALL_RADIUS: f32 = ROUND_BALL_SIZE / 2.0;
|
||||
|
||||
// Z-INDEXES
|
||||
pub const ROUND_BALL_Z: f32 = 10.0;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ pub fn spawn_round_ball(
|
|||
commands.spawn((
|
||||
Sprite {
|
||||
image,
|
||||
custom_size: Some(Vec2::splat(STEP)),
|
||||
custom_size: Some(Vec2::splat(ROUND_BALL_SIZE)),
|
||||
..default()
|
||||
},
|
||||
Transform::from_translation((track.segments[0].start_pos).extend(ROUND_BALL_Z)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue