Update
parent
9f49fb4acc
commit
0505eaea8b
|
@ -15,10 +15,8 @@ impl Plugin for LevelgenPlugin {
|
||||||
|
|
||||||
#[derive(Clone, Serialize, Deserialize)]
|
#[derive(Clone, Serialize, Deserialize)]
|
||||||
pub struct Level {
|
pub struct Level {
|
||||||
enemies: Vec<String>,
|
|
||||||
waves: u32,
|
|
||||||
treasure: i32,
|
|
||||||
doors: Vec<bool>,
|
doors: Vec<bool>,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
|
@ -36,15 +34,6 @@ pub struct LevelGenerator {
|
||||||
|
|
||||||
fn setup_levels(mut commands: Commands) {
|
fn setup_levels(mut commands: Commands) {
|
||||||
let default_level: String = "
|
let default_level: String = "
|
||||||
# Enemies can only be set if they exist in data/enemies/
|
|
||||||
# for example data/enemies/grunt.yml
|
|
||||||
enemies: [
|
|
||||||
grunt
|
|
||||||
]
|
|
||||||
# 0 means no enemies
|
|
||||||
waves: 0
|
|
||||||
# 0 is no treasure
|
|
||||||
treasure: 0
|
|
||||||
doors: [
|
doors: [
|
||||||
true, # North
|
true, # North
|
||||||
true, # East
|
true, # East
|
||||||
|
@ -87,8 +76,8 @@ fn setup_levels(mut commands: Commands) {
|
||||||
levels_west: levels_west_loaded,
|
levels_west: levels_west_loaded,
|
||||||
path: vec![starting_level.clone()],
|
path: vec![starting_level.clone()],
|
||||||
current_enemies: Vec::new(),
|
current_enemies: Vec::new(),
|
||||||
current_waves: starting_level.waves,
|
current_waves: 1,
|
||||||
current_treasure: starting_level.treasure,
|
current_treasure: 1,
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
pub struct PlayAreaManagerPlugin;
|
||||||
|
|
||||||
|
impl Plugin for PlayAreaManagerPlugin {
|
||||||
|
fn build(&self, app: &mut App) {
|
||||||
|
app.add_systems();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue