2024-11-23 17:09:42 +01:00
|
|
|
use std::fs;
|
|
|
|
|
2024-11-23 16:24:16 +01:00
|
|
|
use bevy::{core_pipeline::smaa::SmaaSpecializedRenderPipelines, prelude::*};
|
2024-11-23 16:13:54 +01:00
|
|
|
use bevy::{prelude::*, scene::ScenePlugin};
|
|
|
|
use bevy_editor_pls::EditorPlugin;
|
2024-11-22 22:39:00 +01:00
|
|
|
use bevy_rapier2d::prelude::*;
|
2024-11-23 17:09:42 +01:00
|
|
|
use readformat::readf;
|
2024-11-22 22:39:00 +01:00
|
|
|
|
2024-11-23 01:40:50 +01:00
|
|
|
use crate::AppState;
|
|
|
|
|
2024-11-22 22:39:00 +01:00
|
|
|
pub(super) fn scene_plugin(app: &mut App) {
|
2024-11-23 16:13:54 +01:00
|
|
|
app.add_plugins(EditorPlugin::default());
|
2024-11-23 17:09:42 +01:00
|
|
|
// app.add_systems(, )
|
|
|
|
app.add_systems(Startup, (import_text_world,));
|
|
|
|
}
|
|
|
|
|
|
|
|
pub(super) fn import_text_world(mut commands: Commands, assets: Res<AssetServer>) {
|
|
|
|
let world_string = fs::read_to_string("assets/world.txt");
|
|
|
|
let &[info_string, world_string] = readf("info section\n{}\nworld section\n{}", world_string);
|
|
|
|
println!()
|
2024-11-22 22:39:00 +01:00
|
|
|
}
|