Class GraphUpdater

java.lang.Object
com.badlogic.ashley.core.EntitySystem
com.badlogic.ashley.systems.IteratingSystem
gaiasky.scene.system.update.AbstractUpdateSystem
gaiasky.scene.system.update.GraphUpdater
All Implemented Interfaces:
EntityUpdater

public class GraphUpdater extends AbstractUpdateSystem
Processes entities in a scene graph, which have a GraphRoot component. Generally, this should be a single entity unless we have more than one scene graph.
  • Constructor Details

    • GraphUpdater

      public GraphUpdater(com.badlogic.ashley.core.Family family, int priority, ITimeFrameProvider time)
      Instantiates a system that will iterate over the entities described by the Family.
      Parameters:
      family - The family of entities iterated over in this System. In this case, it should be just one (GraphRoot.
  • Method Details

    • setCamera

      public void setCamera(ICamera camera)
    • processEntity

      protected void processEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
      Specified by:
      processEntity in class com.badlogic.ashley.systems.IteratingSystem
    • updateEntity

      public void updateEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
      Description copied from interface: EntityUpdater
      Updates the entity.
      Parameters:
      entity - The entity to update.
      deltaTime - The delta time since last frame.
    • printTree

      public void printTree(com.badlogic.ashley.core.Entity entity, String tab, int level, AtomicInteger count)
    • update

      public void update(com.badlogic.ashley.core.Entity entity, ITimeFrameProvider time, Vector3b parentTransform, float opacity)
    • getVisibilityOpacityFactor

      protected float getVisibilityOpacityFactor(Base base)
    • msSinceStateChange

      protected long msSinceStateChange(Base base)
    • mustUpdateLoc

      public boolean mustUpdateLoc(com.badlogic.ashley.core.Entity entity, GraphNode graph)
    • updateSpacecraft

      public void updateSpacecraft(com.badlogic.ashley.core.Entity entity, GraphNode graph)