-
Notifications
You must be signed in to change notification settings - Fork 9
Dialogue Box For NPC
The DialogBox class is a custom dialog box designed to be used by everyone who wants to implement a dialog pop up component for interaction alerts and more . It serves as an introductory dialog box that presents an dialog box when the player clicks F when he encounters the Botanist cum Wizard in the game game. This class extends the LibGDX Dialog class and provides a structured and visually appealing way to present game-related information.
The DialogBox class can be used to display a dialog box with the desired text , and a button.
showDialog(Stage stage) This method adds the Dialog instance to the specified stage, making it visible to the user.
stage: The Stage where the dialog should be displayed.
The DialogueBox class uses event handling to respond to button clicks. When the "OK" button is clicked, it triggers the "ok" event, which can be handled externally and removes the stage.
To handle the "ok" event, you can add a listener to an instance of the Entity class. In the provided example, the onOK() method is called when the "OK" button is clicked.
-
Dev Gupta @DRG31
-
Aniket Gupta @aniketgupta17
-
Yash Mittal @YashMitttal
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files