Constructor
new StatusBarBottle()
Constructs the StatusBarBottle, loads its images, sets its initial position and size,
and initializes the bottle percentage to 0.
Members
IMAGES :Array.<string>
An array of image paths representing different bottle levels.
Type:
- Array.<string>
percentage :number
The current bottle percentage (from 0 to 5).
Type:
- number
Methods
setPercentage(percentage)
Sets the bottle level and updates the status bar image accordingly.
The percentage is constrained between 0 and 5.
Parameters:
| Name | Type | Description |
|---|---|---|
percentage |
number | The new bottle percentage. |