[][src]Struct yy_boss::YypBoss

pub struct YypBoss {
    pub directory_manager: DirectoryManager,
    pub pipeline_manager: PipelineManager,
    pub sprites: YyResourceHandler<Sprite>,
    pub scripts: YyResourceHandler<Script>,
    pub objects: YyResourceHandler<Object>,
    pub shaders: YyResourceHandler<Shader>,
    pub notes: YyResourceHandler<Note>,
    pub animation_curves: YyResourceHandler<AnimationCurve>,
    pub extensions: YyResourceHandler<Extension>,
    pub fonts: YyResourceHandler<Font>,
    pub paths: YyResourceHandler<YyPath>,
    pub rooms: YyResourceHandler<Room>,
    pub sequences: YyResourceHandler<Sequence>,
    pub sounds: YyResourceHandler<Sound>,
    pub tilesets: YyResourceHandler<TileSet>,
    pub timelines: YyResourceHandler<Timeline>,
    pub vfs: Vfs,
    // some fields omitted
}

Fields

directory_manager: DirectoryManagerpipeline_manager: PipelineManagersprites: YyResourceHandler<Sprite>scripts: YyResourceHandler<Script>objects: YyResourceHandler<Object>shaders: YyResourceHandler<Shader>notes: YyResourceHandler<Note>animation_curves: YyResourceHandler<AnimationCurve>extensions: YyResourceHandler<Extension>fonts: YyResourceHandler<Font>paths: YyResourceHandler<YyPath>rooms: YyResourceHandler<Room>sequences: YyResourceHandler<Sequence>sounds: YyResourceHandler<Sound>tilesets: YyResourceHandler<TileSet>timelines: YyResourceHandler<Timeline>vfs: Vfs

Implementations

impl YypBoss[src]

pub fn new<P: AsRef<Path>>(path_to_yyp: P) -> Result<YypBoss, StartupError>[src]

Creates a new YyBoss Manager and performs startup file reading.

pub fn with_startup_injest<P: AsRef<Path>>(
    path_to_yyp: P,
    resources_to_scan: &[Resource]
) -> Result<YypBoss, StartupError>
[src]

pub fn default_texture_path(&self) -> Option<TexturePath>[src]

Gets the default texture path, if it exists. The "Default" group simply has the name "Default".

This method will almost certainly be refactored soon to a dedicated TextureManager.

pub fn serialize(&mut self) -> AnyResult<()>[src]

Serializes the YypBoss data to disk at the path of the Yyp.

pub fn version_string(&self) -> &str[src]

pub fn project_metadata(&self) -> ProjectMetadata[src]

pub fn tcu(&self) -> &TrailingCommaUtility[src]

pub fn yyp(&self) -> &Yyp[src]

impl YypBoss[src]

pub fn add_resource<T: YyResource>(
    &mut self,
    yy_file: T,
    associated_data: T::AssociatedData
) -> Result<(), ResourceManipulationError>
[src]

Adds a new resource, which must not already exist within the project.

pub fn remove_resource<T: YyResource>(
    &mut self,
    name: &str
) -> Result<(T, Option<T::AssociatedData>), ResourceManipulationError>
[src]

Adds a new resource, which must not already exist within the project.

pub fn rename_resource<T: YyResource>(
    &mut self,
    name: &str,
    new_name: String
) -> Result<(), ResourceManipulationError>
[src]

Adds a new resource, which must not already exist within the project.

pub fn can_use_name(&self, name: &str) -> Result<(), ResourceManipulationError>[src]

pub fn move_resource<T: YyResource>(
    &mut self,
    name: &str,
    new_parent: ViewPath
) -> Result<(), ResourceManipulationError>
[src]

Move a resource within the Asset Tree

pub fn get_resource<T: YyResource>(
    &self,
    name: &str
) -> Option<&YyResourceData<T>>
[src]

Gets a resource via the type. Users should probably not use this method unless they're doing some generic code. Instead, simply use each resources manager as appropriate -- for example, to get an object's data, use yyp_boss.objects.get.

Nb: YyResourceData might not have any AssociatedData on it. See its warning on how Associated Data is held lazily.

pub fn ensure_associated_data_is_loaded<T: YyResource>(
    &mut self,
    name: &str,
    force: bool
) -> Result<(), YyResourceHandlerError>
[src]

Ensures some associated data is loaded by generic type. If you aren't working generically, just access the individual handlers for this.

If force is passed in, then this will always reload the associated data. Be careful out there -- hot reloading isn't a feature we really support yet.

This operation will return a reference to the associated data if we succeeded.

impl YypBoss[src]

pub fn move_resource_dynamic(
    &mut self,
    name: &str,
    new_parent: ViewPath,
    resource: Resource
) -> Result<(), ResourceManipulationError>
[src]

Move a resource within the Asset Tree, using the passed in resource type

pub fn remove_folder(
    &mut self,
    folder: &ViewPathLocation
) -> Result<(), ResourceManipulationError>
[src]

Removes a folder RECURSIVELY. All resources within will be removed. Be careful out there.

Trait Implementations

impl Debug for YypBoss[src]

impl Default for YypBoss[src]

impl PartialEq<YypBoss> for YypBoss[src]

impl StructuralPartialEq for YypBoss[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,