debug logger
This commit is contained in:
parent
8520323cca
commit
f502cdb0ce
1 changed files with 20 additions and 12 deletions
32
src/main.rs
32
src/main.rs
|
|
@ -2,36 +2,44 @@ use crate::common::messages::ExitRequestMessage;
|
||||||
use crate::common::plugin::CommonUiPlugin;
|
use crate::common::plugin::CommonUiPlugin;
|
||||||
use crate::common::systems::exit_system;
|
use crate::common::systems::exit_system;
|
||||||
use bevy::camera::ScalingMode;
|
use bevy::camera::ScalingMode;
|
||||||
|
use bevy::log::LogPlugin;
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
mod gameplay;
|
mod gameplay;
|
||||||
mod states;
|
mod states;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use crate::states::game::state::MainGameState;
|
use crate::states::game::state::MainGameState;
|
||||||
|
use crate::states::linear::plugin::LinearPlayPlugin;
|
||||||
use crate::states::main_menu::state::MainMenuState;
|
use crate::states::main_menu::state::MainMenuState;
|
||||||
use crate::states::settings_menu::state::SettingsMenuState;
|
use crate::states::settings_menu::state::SettingsMenuState;
|
||||||
use crate::states::linear::plugin::LinearPlayPlugin;
|
|
||||||
|
|
||||||
const FACTOR: u32 = 40;
|
const FACTOR: u32 = 40;
|
||||||
const WIDTH: u32 = 32;
|
const WIDTH: u32 = 32;
|
||||||
const HEIGHT: u32 = 18;
|
const HEIGHT: u32 = 18;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
.add_message::<ExitRequestMessage>()
|
.add_message::<ExitRequestMessage>()
|
||||||
.add_plugins(DefaultPlugins.set(WindowPlugin {
|
.add_plugins(
|
||||||
primary_window: Some(Window {
|
DefaultPlugins
|
||||||
title: "alpha v0.2".into(),
|
.set(WindowPlugin {
|
||||||
resolution: (WIDTH * FACTOR, HEIGHT * FACTOR).into(),
|
primary_window: Some(Window {
|
||||||
resizable: true,
|
title: "alpha v0.2".into(),
|
||||||
..default()
|
resolution: (WIDTH * FACTOR, HEIGHT * FACTOR).into(),
|
||||||
}),
|
resizable: true,
|
||||||
..default()
|
..default()
|
||||||
}))
|
}),
|
||||||
|
..default()
|
||||||
|
})
|
||||||
|
// выводит много инфы, раскоментить по необходимости
|
||||||
|
// .set(LogPlugin {
|
||||||
|
// level: bevy::log::Level::DEBUG,
|
||||||
|
// filter: "bevy_ecs=debug".to_string(),
|
||||||
|
// ..default()
|
||||||
|
// }),
|
||||||
|
)
|
||||||
.add_plugins((
|
.add_plugins((
|
||||||
CommonUiPlugin,
|
CommonUiPlugin,
|
||||||
MainMenuState,
|
MainMenuState,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue