Skip to content

Wave Slider

Praneet Dhoolia edited this page Oct 17, 2023 · 5 revisions

Description

The Wave Slider displays the total progress made on that planet. It visualizes the mobs killed so far (green) and the remaining mobs (red) separated by a slider. image

Functionality

The slider is displayed using a LevelProgressBar class that extends the ProgressBar class from libGdx. The variable size for either side of the bar is achieved using a resizable rectangle created by getColoredDrawable. The mechanism is carried out by the public ProgressBar (float min, float max, float stepSize, boolean vertical, ProgressBarStyle style) constructor, which continuously polls the mob count to update the bar as soon as a mob is killed.

Clone this wiki locally