Package com.csse3200.game.components
Class CodexTerminalComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CodexTerminalComponent
Special component that can be attached to codex terminal entries.
Responsible for handling player interactions and performing side effects.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCodexTerminalComponent(CodexEntry codexEntry) Codex terminal component constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the codex entry stored by the terminal.voidsetPlayerInRange(ColliderComponent collider) Decide if the player is considered in range given a collider input.Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
CodexTerminalComponent
Codex terminal component constructor.- Parameters:
codexEntry- Reference to the entry this terminal gives to the player.
-
-
Method Details
-
getCodexEntry
Returns the codex entry stored by the terminal.- Returns:
- The codex entry stored by the terminal.
-
setPlayerInRange
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.
-