Package gaiasky.scene
Class Archetypes
java.lang.Object
gaiasky.scene.Archetypes
-
Field Summary
Modifier and TypeFieldDescriptionArchetypes map, links old scene graph model objects to artemis archetypes. -
Constructor Summary
-
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
Archetypes map, links old scene graph model objects to artemis archetypes.
-
-
Constructor Details
-
Archetypes
public Archetypes()Creates a new archetypes 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
Gets an archetype by name (key).- Parameters:
key
- The name of the archetype.- Returns:
- The archetype.
-
get
Gets an archetype by class.- Parameters:
archetypeClass
- The class of the archetype.- Returns:
- The archetype.
-
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
-