This example demonstrates UIProgress elements for creating dynamic progress bars and health indicators. A health bar is positioned above the character showing real-time progress updates, along with all previous UI elements and a vignette overlay.
const direction = { x: 1, y: 0.5 };
// Create progress bar
const bar = new UIProgress(
layer,
baseScene.loadedTextures["T_Progress_Foreground"],
{
color: UIColor.orange,
progress: 0.8,
maskFunction:
new UIProgressMaskFunctionDirectional(direction),
},
);