Skip to content

Powerup Visualization and Interaction

saakshigupta2002 edited this page Oct 5, 2023 · 2 revisions

Overview and Introduction

The CompanionInventoryDisplay class serves as a crucial user interface component in our game, providing a visual representation of the companion's inventory of powerups. This page introduces the class's role, emphasizing its significance in enhancing the gaming experience.

Class Structure and Components

The internal structure of the CompanionInventoryDisplay class, highlighting key instance variables and methods. Understand the purpose of major components like powerupConfigs, powerupGroup, and inventoryComponent.

Creation and Initialization

The initialization process of the class, emphasizing the createUpgradeDisplay factory method. Learn how the class is instantiated with a background texture and an associated companion inventory component.

Powerup Configuration and Loading

Discover how the class handles powerup configurations, reading them from a JSON file. Understand the role of the PowerupConfigs class and how powerup buttons are dynamically created and positioned.

User Interface Elements

Explore the layout of the window, including its dimensions and positioning. Learn about the creation of title tables and exit buttons. Understand how the powerup buttons are organized in rows for a clear and intuitive user interface.

Clone this wiki locally