variable naming
This commit is contained in:
parent
e2b5513dd3
commit
00e5bab2a5
1 changed files with 4 additions and 4 deletions
|
@ -78,16 +78,16 @@ fn setup(
|
|||
const TILE_SPACE: f32 = TOTAL_WIDTH / TILES as f32;
|
||||
const CENTER: f32 = TOTAL_WIDTH / 2.;
|
||||
|
||||
let circle_mesh = Mesh2dHandle(meshes.add(Rectangle::new(TILE_SIZE, TILE_SIZE)));
|
||||
let color = Color::from(tailwind::NEUTRAL_700);
|
||||
let tile_mesh = Mesh2dHandle(meshes.add(Rectangle::new(TILE_SIZE, TILE_SIZE)));
|
||||
let tile_color = Color::from(tailwind::NEUTRAL_700);
|
||||
|
||||
for i in 0..TILES {
|
||||
for j in 0..TILES {
|
||||
let tile_x = i as f32 * TILE_SPACE - CENTER + OFFSET;
|
||||
let tile_y = j as f32 * TILE_SPACE - CENTER + OFFSET;
|
||||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: circle_mesh.clone(),
|
||||
material: materials.add(color),
|
||||
mesh: tile_mesh.clone(),
|
||||
material: materials.add(tile_color),
|
||||
transform: Transform::from_xyz(tile_x, tile_y, 0.),
|
||||
..default()
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue