Class WorldMapNodeRenderComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class WorldMapNodeRenderComponent extends UIComponent
Renders a world map node using the engine's rendering system
  • Constructor Details

    • WorldMapNodeRenderComponent

      public WorldMapNodeRenderComponent(WorldMapNode node, com.badlogic.gdx.math.Vector2 worldSize, float nodeSize)
      Constructor for the world map node render component.
      Parameters:
      node - the node to render
      worldSize - the size of the world map
      nodeSize - the size of the node
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class UIComponent
    • updateProximityState

      public void updateProximityState(WorldMapNode nearbyNode)
      Updates the proximity state for this node.
      Parameters:
      nearbyNode - the node the player is currently near, or null if none
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Description copied from class: RenderComponent
      Draw the renderable. Should be called only by the renderer, not manually.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • setShowPrompt

      public void setShowPrompt(boolean showPrompt)