Class FilesResourcesReader
- java.lang.Object
-
- net.sf.gridarta.model.resource.AbstractResourcesReader<G>
-
- net.sf.gridarta.model.resource.AbstractFilesResourcesReader<GameObject,MapArchObject,Archetype>
-
- net.sf.gridarta.var.atrinik.resource.FilesResourcesReader
-
public class FilesResourcesReader extends AbstractFilesResourcesReader<GameObject,MapArchObject,Archetype>
Loads all resources from individual files.
-
-
Constructor Summary
Constructors Constructor Description FilesResourcesReader(@NotNull java.io.File archDirectory, @NotNull java.io.File collectedDirectory, @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet, @NotNull AbstractArchetypeParser<GameObject,MapArchObject,Archetype,?> archetypeParser, @NotNull FaceObjects faceObjects, @NotNull AnimationObjects animationObjects, @NotNull ArchFaceProvider archFaceProvider, @NotNull AtrinikAnimationObjectsReader animationObjectsReader)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisValidEntry(int folderLevel, java.lang.String name)Returns whether a file name should be processed.@NotNull FaceProviderread(@NotNull ErrorView errorView, @NotNull java.util.List<GameObject> invObjects)Reads the resources.-
Methods inherited from class net.sf.gridarta.model.resource.AbstractResourcesReader
addPNGFace, loadAnimationsFromCollect, loadAnimTree
-
-
-
-
Constructor Detail
-
FilesResourcesReader
public FilesResourcesReader(@NotNull @NotNull java.io.File archDirectory, @NotNull @NotNull java.io.File collectedDirectory, @NotNull @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet, @NotNull @NotNull AbstractArchetypeParser<GameObject,MapArchObject,Archetype,?> archetypeParser, @NotNull @NotNull FaceObjects faceObjects, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull ArchFaceProvider archFaceProvider, @NotNull @NotNull AtrinikAnimationObjectsReader animationObjectsReader)Creates a new instance.- Parameters:
archDirectory- the "arch" directory to readcollectedDirectory- the collected directoryarchetypeSet- the archetype set to updatearchetypeParser- the archetype parser to usefaceObjects- the face objects instanceanimationObjects- the animation objects instancearchFaceProvider- the arch face provider to useanimationObjectsReader- the animation objects reader instance to use
-
-
Method Detail
-
read
@NotNull public @NotNull FaceProvider read(@NotNull @NotNull ErrorView errorView, @NotNull @NotNull java.util.List<GameObject> invObjects)
Description copied from class:AbstractResourcesReaderReads the resources.- Overrides:
readin classAbstractFilesResourcesReader<GameObject,MapArchObject,Archetype>- Parameters:
errorView- the error view for reporting problemsinvObjects- all read archetypes are added to this list- Returns:
- the face provider for accessing the read faces
-
isValidEntry
protected boolean isValidEntry(int folderLevel, java.lang.String name)Description copied from class:AbstractFilesResourcesReaderReturns whether a file name should be processed.- Specified by:
isValidEntryin classAbstractFilesResourcesReader<GameObject,MapArchObject,Archetype>- Parameters:
folderLevel- the folder levelname- the base name of the file name- Returns:
- whether the entry is valid and should be processed
-
-