Проектная работа - WIP

This commit is contained in:
4 changed files with 27 additions and 21 deletions
+4 -2
View File
@@ -71,8 +71,9 @@ pub fn spawn_grid(commands: &mut Commands) {
for x in -20..=20 {
let color = if x % 5 == 0 { Color::srgb(1.0, 0.2, 0.5) } else { Color::srgb(1.0, 1.0, 0.5) };
let weight = if x % 5 == 0 { 1.0 } else { 0.5 };
commands.spawn((
Sprite::from_color(color, vec2(0.5, 2000.0)),
Sprite::from_color(color, vec2(weight, 2000.0)),
Transform {
translation: vec3(x as f32 * GRID_SIZE as f32, 0.0, -1.0),
..Default::default()
@@ -82,8 +83,9 @@ pub fn spawn_grid(commands: &mut Commands) {
}
for y in -20..=20 {
let color = if y % 5 == 0 { Color::srgb(1.0, 0.2, 0.5) } else { Color::srgb(1.0, 1.0, 0.5) };
let weight = if y % 5 == 0 { 1.0 } else { 0.5 };
commands.spawn((
Sprite::from_color(color, vec2(2000.0, 0.5)),
Sprite::from_color(color, vec2(2000.0, weight)),
Transform {
translation: vec3(0.0, y as f32 * GRID_SIZE as f32, -1.0),
..Default::default()