feat(blueprints): experimenting with the bevy side of things
This commit is contained in:
parent
e53098db72
commit
6f93b6e55a
|
@ -120,6 +120,10 @@ impl Plugin for BlueprintsPlugin {
|
|||
.register_type::<MaterialInfo>()
|
||||
.register_type::<SpawnHere>()
|
||||
.register_type::<Animations>()
|
||||
.register_type::<BlueprintsList>()
|
||||
.register_type::<Vec<String>>()
|
||||
.register_type::<HashMap<String,Vec<String>>>()
|
||||
|
||||
.insert_resource(BluePrintsConfig {
|
||||
format: self.format,
|
||||
library_folder: self.library_folder.clone(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use bevy::{gltf::Gltf, prelude::*};
|
||||
use bevy::{gltf::Gltf, prelude::*, utils::HashMap};
|
||||
|
||||
use crate::{Animations, BluePrintsConfig};
|
||||
|
||||
|
@ -46,6 +46,11 @@ pub struct AddToGameWorld;
|
|||
/// helper component, just to transfer child data
|
||||
pub(crate) struct OriginalChildren(pub Vec<Entity>);
|
||||
|
||||
|
||||
#[derive(Component, Reflect, Default, Debug)]
|
||||
#[reflect(Component)]
|
||||
pub struct BlueprintsList(pub HashMap<String,Vec<String>>);
|
||||
|
||||
/// main spawning functions,
|
||||
/// * also takes into account the already exisiting "override" components, ie "override components" > components from blueprint
|
||||
pub(crate) fn spawn_from_blueprints(
|
||||
|
|
Loading…
Reference in New Issue