Class BaseView

Direct Known Subclasses:
BillboardView, FilterView, FocusView, KeyframesView, LineView, RenderView, SpacecraftView, VertsView

public class BaseView extends AbstractView
A basic view with the base and body components that all entities have.
  • Field Details

    • base

      public Base base
      The base component.
    • body

      public Body body
      The body component.
  • Constructor Details

    • BaseView

      public BaseView()
    • BaseView

      public BaseView(com.badlogic.ashley.core.Entity entity)
  • Method Details

    • componentsCheck

      protected boolean componentsCheck(com.badlogic.ashley.core.Entity entity)
      Description copied from class: AbstractView
      Check whether the current components are the same as the components of the given entity.
      Specified by:
      componentsCheck in class AbstractView
      Parameters:
      entity - The entity to check.
      Returns:
      True if the components are the same, false otherwise.
    • entityCheck

      protected void entityCheck(com.badlogic.ashley.core.Entity entity)
      Description copied from class: AbstractView
      Checks whether the given entity is suitable for this view. This method should throw a RuntimeException if the entity is not suitable.
      Specified by:
      entityCheck in class AbstractView
      Parameters:
      entity - The entity.
    • entityChanged

      protected void entityChanged()
      Description copied from class: AbstractView
      Contains actions to take after a new entity has been set. This method is typically used to initialize the view components.
      Specified by:
      entityChanged in class AbstractView
    • entityCleared

      protected void entityCleared()
      Description copied from class: AbstractView
      This method is called when the entity of this view is cleared. It should set all component references to null.
      Specified by:
      entityCleared in class AbstractView
    • setColor

      public void setColor(float[] color)
    • getComponent

      public <T extends com.badlogic.ashley.core.Component> T getComponent(Class<T> c)
    • getOpacity

      public float getOpacity()
    • getBase

      public Base getBase()
    • getBody

      public Body getBody()
    • isVisible

      public boolean isVisible()
    • setVisible

      public void setVisible(boolean visible)
    • setVisible

      public void setVisible(boolean visible, String name)
    • isVisible

      public boolean isVisible(boolean attributeValue)
    • hasCt

      public boolean hasCt(ComponentTypes.ComponentType ct)
    • setForceLabel

      public void setForceLabel(Boolean forceLabel)
    • setForcelabel

      public void setForcelabel(Boolean forceLabel)
    • isForceLabel

      public boolean isForceLabel()