Merge branch 'master' of https://git.txmn.tk/tuxmain/bevyjam into nixon-main
This commit is contained in:
commit
b45f052e5a
15 changed files with 173 additions and 81 deletions
22
src/main.rs
22
src/main.rs
|
|
@ -13,7 +13,7 @@ mod audio_system;
|
|||
use bevy::{
|
||||
asset::{Asset, HandleId, LoadState},
|
||||
prelude::*,
|
||||
window::{WindowId, WindowMode},
|
||||
window::{WindowMode, WindowResizeConstraints},
|
||||
};
|
||||
use bevy_common_assets::json::JsonAssetPlugin;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
|
|
@ -52,6 +52,19 @@ fn main() {
|
|||
|
||||
let mut app = App::new();
|
||||
app.insert_resource(Msaa { samples: 4 })
|
||||
.insert_resource(WindowDescriptor {
|
||||
width: 640.0,
|
||||
height: 480.0,
|
||||
resize_constraints: WindowResizeConstraints {
|
||||
min_width: 256.,
|
||||
min_height: 256.,
|
||||
max_width: f32::INFINITY,
|
||||
max_height: f32::INFINITY,
|
||||
},
|
||||
resizable: true,
|
||||
title: "Lux synthesĕ".into(),
|
||||
..Default::default()
|
||||
})
|
||||
.insert_resource(UseEditor(use_editor))
|
||||
.add_state(AppState::Loading)
|
||||
.insert_resource(game::FirstLevel(first_level))
|
||||
|
|
@ -82,12 +95,7 @@ fn main() {
|
|||
.run();
|
||||
}
|
||||
|
||||
fn setup(mut commands: Commands, mut windows: ResMut<Windows>, asset_server: Res<AssetServer>) {
|
||||
windows
|
||||
.get_mut(WindowId::primary())
|
||||
.unwrap()
|
||||
.set_title(String::from("Bevyjam"));
|
||||
|
||||
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
let mut assets = LoadingAssets(Vec::new());
|
||||
commands.insert_resource(
|
||||
assets.add(asset_server.load::<levels::StoredLevels, _>("game.levels.json")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue