Class CodexTerminalComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CodexTerminalComponent

public class CodexTerminalComponent extends Component
Special component that can be attached to codex terminal entries. Responsible for handling player interactions and performing side effects.
  • Constructor Details

    • CodexTerminalComponent

      public CodexTerminalComponent(CodexEntry codexEntry)
      Codex terminal component constructor.
      Parameters:
      codexEntry - Reference to the entry this terminal gives to the player.
  • Method Details

    • getCodexEntry

      public CodexEntry getCodexEntry()
      Returns the codex entry stored by the terminal.
      Returns:
      The codex entry stored by the terminal.
    • setPlayerInRange

      public void setPlayerInRange(ColliderComponent collider)
      Decide if the player is considered in range given a collider input. If the collider is not null, presume player is colliding and add "interact" event.
      Parameters:
      collider - The collider interacting with this component's entity.