Remove ECS pattern: Split into new repo
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m2s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m2s
This commit is contained in:
parent
d232706f68
commit
f486486be3
32 changed files with 23 additions and 1823 deletions
27
src/main.rs
27
src/main.rs
|
@ -1,35 +1,14 @@
|
|||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
use bevy_app::{App, AppExit};
|
||||
|
||||
pub mod core;
|
||||
pub mod game;
|
||||
pub mod old_app;
|
||||
|
||||
mod render;
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
run_new_app();
|
||||
// run_old_app();
|
||||
}
|
||||
|
||||
fn run_new_app() {
|
||||
let mut app = App::default();
|
||||
game::init(&mut app);
|
||||
match app.run() {
|
||||
AppExit::Success => {}
|
||||
AppExit::Error(e) => {
|
||||
log::error!("Error running new app: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn run_old_app() {
|
||||
let event_loop = EventLoop::new().unwrap();
|
||||
event_loop.set_control_flow(ControlFlow::Poll);
|
||||
|
||||
let vulkan_context = old_app::vulkan_context::VulkanContext::from(&event_loop);
|
||||
let mut app = old_app::app::App::from(vulkan_context);
|
||||
let vulkan_context = render::vulkan_context::VulkanContext::from(&event_loop);
|
||||
let mut app = render::app::App::from(vulkan_context);
|
||||
|
||||
match event_loop.run_app(&mut app) {
|
||||
Ok(_) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue