Compare commits

..

2 Commits

Author SHA1 Message Date
Zynh Ludwig f17917ecad easier numbers? 2024-08-20 21:45:43 -07:00
Zynh Ludwig dfc012d370 Revert "hee hee spinny square"
This reverts commit 26cf4c7453.
2024-08-20 21:40:38 -07:00
1 changed files with 3 additions and 10 deletions

View File

@ -60,16 +60,9 @@ fn main() {
.insert_resource(WinitSettings::desktop_app())
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.add_systems(Update, rotate_board)
.run();
}
fn rotate_board(mut board: Query<&mut Transform, With<Board>>) {
let mut board = board.get_single_mut().unwrap();
board.rotate_local_z(0.1);
}
#[derive(Component)]
struct Board;
@ -81,8 +74,8 @@ fn setup(
commands.spawn(Camera2dBundle::default());
const TILES: i32 = 9;
const TILE_SIZE: f32 = 50.;
const GAP_SIZE: f32 = 10.;
const TILE_SIZE: f32 = 5.;
const GAP_SIZE: f32 = 1.;
const TOTAL_WIDTH: f32 = (TILE_SIZE + GAP_SIZE) * TILES as f32;
const TILE_SPACE: f32 = TOTAL_WIDTH / TILES as f32;
const OFFSET: f32 = TILE_SPACE / 2.;
@ -94,7 +87,7 @@ fn setup(
commands
.spawn((
SpatialBundle {
transform: Transform::from_xyz(0., 0., 0.),
transform: Transform::from_xyz(0., 0., 0.).with_scale(Vec3::splat(10.)),
..default()
},
Board,