Init plugins + first system
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 5m40s

This commit is contained in:
Florian RICHER 2025-05-16 14:22:18 +02:00
parent dda368e802
commit 6639f0bb1e
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
4 changed files with 48 additions and 5 deletions

View file

@ -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
View 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!");
}