ZUZLL6PWZE57MLTQJ56MT3HGIQU6NEHQRB63VQYJRY5HNVC7NVMAC 7BH3JTSGT655ESF4H7UY2BPSXV35JGKAKYUWZVLCKPCEAQDSL57QC D4QISWMTFAC4M2VFEQJBQ4FTJRRKTJCJCECDQPICUELOD75XSMUAC 7FTW5AQKOO4W5AIHYZSAKLQR6LGVTXH7SKMSTA4ER4C4HP54VE4QC DBHCCY3W2DG4WYMXBZ2UCNYVGZ5PS5UUUNWCXVYJ4TMXQDIZT6GAC CAN3DHITMPDA2DJC63QMMPMIC63FMWCUAI4ZLKPLEHIYG2EWIAHAC 5Y32O2B2GTH2UHFA3NO4ZY673XNHT3W4DQADFMK4LMKLSXMZKHGQC OQCI44VL3IROGBJ52MUI3AICPKEPAJVFL45PGQNNQRK4TKIK7HAAC HYJ4HJQVLLDTE6JYKEYQK2LBWREOQUATESGB3QP7WDJB3IMVS6OAC // TODO Make sure update_movement_pointer is ran after all systems that// can affect MovementDirection
// Mark Loading as a loading state, and progress to InGame once done.add_plugins(ProgressPlugin::new(GameState::Loading).continue_to(GameState::InGame)).add_loading_state(LoadingState::new(GameState::Loading).load_collection::<PlayerAssets>(),)
// fn test_move_pointer(time: Res<Time>, mut directed: Query<&mut MovementDirection>) {// for mut md in directed.iter_mut() {// let angle = Vec2::from_angle(std::f32::consts::FRAC_PI_2 * time.delta_seconds());// md.0 = angle.rotate(md.0);// }// }/// The highest speed something is capable of moving
#[derive(Clone, PartialEq, Eq, Debug, Hash, Default, States)]enum GameState {#[default]Loading,InGame,}#[derive(AssetCollection, Resource)]struct PlayerAssets {#[asset(path = "dum_player.png")]texture: Handle<Image>,#[asset(texture_atlas_layout(tile_size_x = 32., tile_size_y = 48., columns = 4, rows = 8))]layout: Handle<TextureAtlasLayout>,}
mesh: MaterialMesh2dBundle {mesh: meshes.add(Rectangle {half_size: (16.0, 16.0).into(),}).into(),// Be careful not to overwrite the LDtk transformtransform: *transform,material: materials.add(Color::PURPLE),
sprite_sheet: SpriteSheetBundle {texture: player_assets.texture.clone(),atlas: TextureAtlas {layout: player_assets.layout.clone(),index: 0,},transform: (*transform) * Transform::default().with_translation(Vec3::Y * 8.0),
// mesh: MaterialMesh2dBundle {// mesh: meshes// .add(Rectangle {// half_size: (16.0, 24.0).into(),// })// .into(),// // Be careful not to overwrite the LDtk transform// // Change our origin// transform: (*transform) * Transform::default().with_translation(Vec3::Y * 8.0),// material: materials.add(Color::PURPLE),// ..default()// },