Make a plugin

This commit is contained in:
Greg Shuflin 2023-03-18 13:46:16 -07:00
parent f862cb7a62
commit 5bc2934672
1 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,16 @@
use bevy::prelude::*;
pub struct GamarjobaPlugin;
impl Plugin for GamarjobaPlugin {
fn build(&self, app: &mut App) {
app.add_startup_system(add_people)
.add_system(gamarjoba)
.add_system(greetings);
}
}
#[derive(Component)]
struct Person;
@ -28,8 +39,6 @@ fn gamarjoba() {
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_startup_system(add_people)
.add_system(greetings)
.add_system(gamarjoba)
.add_plugin(GamarjobaPlugin)
.run();
}