Constructor
new StatusBottleBar()
Creates an instance of StatusBottleBar.
Initializes the bottle bar with default values and loads the images.
- Source:
Methods
collectBottle(index, bottle) → {number}
Collects a bottle and updates the bottle count.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the bottle to be collected. |
bottle |
Array | The array containing the bottles. |
- Source:
Returns:
- The updated number of bottles collected.
- Type
- number
resolveImageIndex()
Resolve the image index, for the bottle bar.
- Source:
setPercentage(bottles)
Set the percentage of the bottle bar.
Parameters:
Name | Type | Description |
---|---|---|
bottles |
number | Number of bottles. |
- Source: