Platform material & filter bundle
This commit is contained in:
parent
12e58b3fc0
commit
297811e882
6 changed files with 93 additions and 21 deletions
17
src/main.rs
17
src/main.rs
|
|
@ -1,11 +1,12 @@
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
mod audio;
|
||||
mod filters;
|
||||
mod game;
|
||||
mod levels;
|
||||
mod menu;
|
||||
mod particle_effect;
|
||||
|
||||
use bevy::{core_pipeline::clear_color::ClearColorConfig, prelude::*};
|
||||
use bevy::prelude::*;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
|
|
@ -23,15 +24,18 @@ fn main() {
|
|||
std::thread::spawn(move || audio::setup(audio_event_receiver));
|
||||
|
||||
App::new()
|
||||
.insert_resource(Msaa { samples: 4 })
|
||||
.insert_resource(audio_event_sender)
|
||||
.add_state(AppState::Menu)
|
||||
.insert_resource(ClearColor(Color::BLACK))
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_plugin(RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(64.0))
|
||||
.add_plugin(RapierDebugRenderPlugin::default())
|
||||
//.add_plugin(RapierDebugRenderPlugin::default())
|
||||
.add_plugin(menu::MenuPlugin)
|
||||
.add_plugin(game::GamePlugin)
|
||||
.add_plugin(particle_effect::ParticleEffectPlugin)
|
||||
.add_plugin(bevy_inspector_egui::WorldInspectorPlugin::new())
|
||||
//.add_plugin(bevy_inspector_egui::WorldInspectorPlugin::new())
|
||||
.add_system(bevy::window::close_on_esc)
|
||||
.add_startup_system(setup)
|
||||
.run();
|
||||
}
|
||||
|
|
@ -43,12 +47,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
let font: Handle<Font> = asset_server.load("UacariLegacy-Thin.ttf");
|
||||
commands.insert_resource(font);
|
||||
|
||||
commands.spawn_bundle(Camera2dBundle {
|
||||
camera_2d: Camera2d {
|
||||
clear_color: ClearColorConfig::Custom(Color::BLACK),
|
||||
},
|
||||
..Default::default()
|
||||
});
|
||||
commands.spawn_bundle(Camera2dBundle::default());
|
||||
commands.insert_resource(AmbientLight {
|
||||
color: Color::WHITE,
|
||||
brightness: 0.6,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue