Class WorldMapNode

java.lang.Object
com.csse3200.game.ui.WorldMapNode

public class WorldMapNode extends Object
Represents a node on the world map that can be registered dynamically.
  • Constructor Details

    • WorldMapNode

      public WorldMapNode(String label, net.dermetfan.utils.Pair<Float,Float> coordinates, boolean completed, boolean unlocked, GdxGame.ScreenType targetScreen, String nodeTexture, String lockReason)
      Creates a new world map node.
      Parameters:
      label - The label of the node
      coordinates - The coordinates of the node
      completed - Whether the node is completed
      unlocked - Whether the node is unlocked
      targetScreen - The target screen of the node
      nodeTexture - The texture of the node
      lockReason - The lock reason of the node
  • Method Details

    • setLabel

      public void setLabel(String label)
      Sets the label of the node.
      Parameters:
      label - The label of the node
    • getRegistrationKey

      public String getRegistrationKey()
      Gets the registration key of the node.
      Returns:
      The registration key of the node
    • setRegistrationKey

      public void setRegistrationKey(String registrationKey)
      Sets the registration key of the node.
      Parameters:
      registrationKey - The registration key of the node
    • setPosition

      public void setPosition(float x, float y)
      Sets the position of the node.
      Parameters:
      x - The x coordinate of the node (0.0-1.0)
      y - The y coordinate of the node (0.0-1.0)
    • setCompleted

      public void setCompleted(boolean completed)
      Sets the completed state of the node.
      Parameters:
      completed - Whether the node is completed
    • setUnlocked

      public void setUnlocked(boolean unlocked)
      Sets the unlocked state of the node.
      Parameters:
      unlocked - Whether the node is unlocked
    • setTargetScreen

      public void setTargetScreen(GdxGame.ScreenType screenType)
      Sets the target screen of the node.
      Parameters:
      screenType - The target screen of the node
    • setNodeTexture

      public void setNodeTexture(String texture)
      Sets the texture of the node.
      Parameters:
      texture - The texture of the node
    • setLockReason

      public void setLockReason(String reason)
      Sets the lock reason of the node.
      Parameters:
      reason - The lock reason of the node
    • getLabel

      public String getLabel()
      Gets the label of the node.
      Returns:
      The label of the node
    • getPositionX

      public float getPositionX()
      Gets the x position of the node.
      Returns:
      The xposition of the node
    • getPositionY

      public float getPositionY()
      Gets the y position of the node.
      Returns:
      The y position of the node
    • getPosition

      public net.dermetfan.utils.Pair<Float,Float> getPosition()
      Gets the position of the node.
      Returns:
      The position of the node
    • isCompleted

      public boolean isCompleted()
      Gets the completed state of the node.
      Returns:
      The completed state of the node
    • isUnlocked

      public boolean isUnlocked()
      Gets the unlocked state of the node.
      Returns:
      The unlocked state of the node
    • getTargetScreen

      public GdxGame.ScreenType getTargetScreen()
      Gets the target screen of the node.
      Returns:
      The target screen of the node
    • getNodeTexture

      public String getNodeTexture()
      Gets the texture of the node.
      Returns:
      The texture of the node
    • getLockReason

      public String getLockReason()
      Gets the lock reason of the node.
      Returns:
      The lock reason of the node