Class Archetypes
java.lang.Object
gaiasky.scene.Archetypes
Holds the archetypes, loaded from
archetypes.json
.-
Field Summary
FieldsModifier and TypeFieldDescriptionArchetypes map, links old scene graph model objects to artemis archetypes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
findArchetype
(com.badlogic.ashley.core.Entity entity) Finds a matching archetype given an entity.Gets an archetype by class.Gets an archetype by name (key).void
initialize
(com.badlogic.ashley.core.Engine engine) Initializes the archetypes map with an entry for each model object.
-
Field Details
-
archetypes
-
-
Constructor Details
-
Archetypes
public Archetypes()Creates a new arch-types container.
-
-
Method Details
-
initialize
public void initialize(com.badlogic.ashley.core.Engine engine) Initializes the archetypes map with an entry for each model object. -
contains
-
get
-
get
-
findArchetype
Finds a matching archetype given an entity.- Parameters:
entity
- The entity.- Returns:
- The matching archetype if it exists, or null if it does not.
-
initializeArchetypes
-