Init plugins + first system
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 5m40s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 5m40s
This commit is contained in:
parent
dda368e802
commit
6639f0bb1e
4 changed files with 48 additions and 5 deletions
|
@ -5,6 +5,8 @@ use crate::core::{
|
|||
window::{Window, config::WindowConfig},
|
||||
};
|
||||
|
||||
pub mod test_plugin;
|
||||
|
||||
pub fn init(app: &mut App) {
|
||||
let window_config = WindowConfig {
|
||||
title: "Rust ASH Test".to_string(),
|
||||
|
@ -12,6 +14,7 @@ pub fn init(app: &mut App) {
|
|||
height: 600,
|
||||
};
|
||||
|
||||
app.add_plugins(test_plugin::TestPlugin);
|
||||
Window::new(app, window_config).unwrap();
|
||||
Vulkan::new(app).unwrap();
|
||||
// Vulkan::new(app).unwrap();
|
||||
}
|
||||
|
|
13
src/game/test_plugin.rs
Normal file
13
src/game/test_plugin.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use bevy_app::{App, Last, Plugin, Startup};
|
||||
|
||||
pub struct TestPlugin;
|
||||
|
||||
impl Plugin for TestPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(Last, setup_system);
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_system() {
|
||||
log::info!("Hello, world!");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue