-
Notifications
You must be signed in to change notification settings - Fork 9
Companion Lab window
Companion Lab Window allows you to explore the art of potion-making within the game. In the Lab Window, you will discover an assortment of elixirs and potions to give Companion newfound strength and resilience.
The primary purpose of the LabWindow class is to create and manage a graphical user interface window that allows players to perform actions related to potion-making and laboratory activities within the game.
LabWindow(Texture background)
A Texture object representing the background image of the laboratory window.
Initialises a new instance of the LabWindow class with the specified background image.
MakeNewLaboratory(Entity deathpotion)
Creates a new LabWindow instance with a given Entity representing a death potion.
failLaboratory()
Call this method to exit the Laboratory without repairing the extractor.
remove()
Overrides the remove() method of the Window class to unregister input override when exiting.
Images (textures) are loaded using the Texture
class.
The ServiceLocator
class is used to access game services.
The Entity
class represents game entities and its implementation.
The InputOverrideComponent
class is used to override user input while the Laboratory window is open.
The LabWindow
class is a custom graphical user interface (GUI) window in a game, extending the LibGDX Window
class. Its constructor configures the window's appearance and layout, initialising UI components, including potion buttons and an exit button, each styled using a provided Skin
. Four potion buttons, labeled and associated with potion images, are added in a Table
layout. Event listeners on these buttons trigger the failLaboratory()
method when clicked. An InputOverrideComponent
is employed to override user input while the laboratory window is open. TheLabWindow
class also includes the remove()
method, unregisters the input override component, ensuring that normal user input is restored when the window is removed.
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files