pub struct BlueprintLibrary {
pub blueprints: HashMap<String, EntityBlueprint>,
}Expand description
Registry of named entity blueprints.
Fields§
§blueprints: HashMap<String, EntityBlueprint>Implementations§
Source§impl BlueprintLibrary
impl BlueprintLibrary
pub fn new() -> Self
pub fn register(&mut self, blueprint: EntityBlueprint)
pub fn get(&self, name: &str) -> Option<&EntityBlueprint>
Sourcepub fn with_defaults(self) -> Self
pub fn with_defaults(self) -> Self
Register standard enemy blueprints.
Trait Implementations§
Source§impl Default for BlueprintLibrary
impl Default for BlueprintLibrary
Source§fn default() -> BlueprintLibrary
fn default() -> BlueprintLibrary
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BlueprintLibrary
impl RefUnwindSafe for BlueprintLibrary
impl Send for BlueprintLibrary
impl Sync for BlueprintLibrary
impl Unpin for BlueprintLibrary
impl UnsafeUnpin for BlueprintLibrary
impl UnwindSafe for BlueprintLibrary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more