Class ParticleSetInitializer
java.lang.Object
com.badlogic.ashley.core.EntitySystem
com.badlogic.ashley.systems.IteratingSystem
gaiasky.scene.system.initialize.AbstractInitSystem
gaiasky.scene.system.initialize.ParticleSetInitializer
- All Implemented Interfaces:
EntityInitializer
Initializer class for particle and star sets (
ParticleSet, StarSet.-
Field Summary
Fields inherited from class AbstractInitSystem
engineBackupFields inherited from class com.badlogic.ashley.core.EntitySystem
priority -
Constructor Summary
ConstructorsConstructorDescriptionParticleSetInitializer(boolean setUp, com.badlogic.ashley.core.Family family, int priority) -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeMeanPosition(com.badlogic.ashley.core.Entity entity, ParticleSet set) voidvoidinitializeEntity(com.badlogic.ashley.core.Entity entity) Contains the initialization of this entity before the scene graph structure has been constructed, or the entity is in the index.voidinitializeStarSet(com.badlogic.ashley.core.Entity entity, StarSet set, Label label, RefSysTransform transform) Initializes a star set.voidsetLabelPosition(com.badlogic.ashley.core.Entity entity) voidsetUpEntity(com.badlogic.ashley.core.Entity entity) Contains the set-up of this entity, after the entity has been added to the scene graph, it is in the index, and assets have been loaded.voidsetUpParticleSet(com.badlogic.ashley.core.Entity entity, ParticleSet set) voidsetUpStarSet(com.badlogic.ashley.core.Entity entity, StarSet set) Methods inherited from class AbstractInitSystem
addedToEngine, isModeInit, isModeSetUp, processEntity, setModeInit, setModeSetUp, toStringModifier and TypeMethodDescriptionvoidaddedToEngine(com.badlogic.ashley.core.Engine engine) booleanbooleanprotected voidprocessEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) voidvoidtoString()Methods inherited from class com.badlogic.ashley.systems.IteratingSystem
getEntities, getFamily, removedFromEngine, updateMethods inherited from class com.badlogic.ashley.core.EntitySystem
checkProcessing, getEngine, setProcessing
-
Constructor Details
-
ParticleSetInitializer
public ParticleSetInitializer(boolean setUp, com.badlogic.ashley.core.Family family, int priority)
-
-
Method Details
-
initializeEntity
public void initializeEntity(com.badlogic.ashley.core.Entity entity) Description copied from interface:EntityInitializerContains the initialization of this entity before the scene graph structure has been constructed, or the entity is in the index. Typically, this adds resources to load via the asset manager, and initializes basic attributes.- Parameters:
entity- The entity.
-
setUpEntity
public void setUpEntity(com.badlogic.ashley.core.Entity entity) Description copied from interface:EntityInitializerContains the set-up of this entity, after the entity has been added to the scene graph, it is in the index, and assets have been loaded. Typically, this fetches loaded assets from the asset manager, and completes the initialization.- Parameters:
entity- The entity.
-
setUpParticleSet
-
initializeStarSet
public void initializeStarSet(com.badlogic.ashley.core.Entity entity, StarSet set, Label label, RefSysTransform transform) Initializes a star set. Loads the data from the provider and computes mean and label positions.- Parameters:
entity- The entity.set- The star set.label- The label component.transform- The transform.
-
setUpStarSet
-
computeMinMeanMaxDistances
-
computeMeanPosition
-
setLabelPosition
public void setLabelPosition(com.badlogic.ashley.core.Entity entity)
-