From cae6ace6860bf8605f0430180163633b762a471f Mon Sep 17 00:00:00 2001 From: Adam Kobzan Date: Wed, 1 Nov 2023 20:32:28 +0200 Subject: [PATCH] removed file --- "\\" | 380 ----------------------------------------------------------- 1 file changed, 380 deletions(-) delete mode 100644 "\\" diff --git "a/\\" "b/\\" deleted file mode 100644 index 0547e05..0000000 --- "a/\\" +++ /dev/null @@ -1,380 +0,0 @@ -#![allow(dead_code, unused_variables, unused_imports)] -mod add_break_blocks; -mod block_reg; -mod chunk; -mod debug_3d; -mod inventory; -mod player; -mod sky; -mod utils; - -use add_break_blocks::*; -use bevy::{prelude::*, window::PrimaryWindow}; -use bevy_atmosphere::prelude::*; -use bevy_meshem::prelude::*; -use block_reg::*; -use chunk::*; -use core::f32::consts::PI; -#[allow(unused_imports)] -use debug_3d::*; -use futures_lite::future; -use inventory::*; -use noise::Perlin; -use player::*; -use sky::*; -use std::sync::Arc; -pub use utils::*; - -// const FACTOR: usize = CHUNK_DIMS.0; -// Render distance should be above 1. -pub const RENDER_DISTANCE: i32 = 6; -pub const GEN_SEED: u32 = 5; -const CROSSHAIR_SIZE: f32 = 22.0; - -#[derive(Resource, Clone)] -pub struct BlockMaterial(Handle); - -#[derive(Resource)] -pub struct GlobalSecondsCounter(u128); - -#[derive(Component)] -struct LoadedChunks(usize); - -#[rustfmt::skip] -fn main() { - let mut app = App::new(); - - // Plugins - app - .add_plugins - - (( - DefaultPlugins - .set(ImagePlugin::default_nearest()) - .set(WindowPlugin { - primary_window: Some(Window { - resizable: false, - mode: bevy::window::WindowMode::BorderlessFullscreen, - ..Default::default()}),..Default::default()}), - - AtmospherePlugin, - PlayerPlugin, - ChunkPlugin, - InventoryPlugin, - )); - - // Resources - app - - .init_resource::() - .insert_resource(AmbientLight { - brightness: 1.6, color: Color::ANTIQUE_WHITE}) - .insert_resource(CycleTimer(Timer::new( - bevy::utils::Duration::from_millis(50), - TimerMode::Repeating,))) - .insert_resource(GlobalSecondsCounter(0)) - .insert_resource(AtmosphereModel::default()); - - // Events - app.add_event::(); - - // Systems - app.add_systems(PostStartup, setup) - // .add_systems( - // PostUpdate, (daylight_cycle).run_if(in_state(InitialChunkLoadState::Complete)),) - .add_systems(OnEnter(InitialChunkLoadState::Complete), setup_light) - .add_systems(Update, - check_if_loaded.run_if(in_state(InitialChunkLoadState::MeshesLoaded)),) - .add_systems(Update,(handle_tasks, add_break_detector, /* debug_cage */),) - .add_systems(PostUpdate, (handle_block_break_place, update_seconds)); - - app.run(); -} - -fn update_seconds(time: Res