Visual skill level indicator (1-5 segments)
[heading: "Description"]A row of up to five segment sprites representing a 1-5 skill rating. Each segment shows a filled or empty frame depending on whether its index is below the current value. Fewer segments can be shown by lowering visibleParts.
[heading: "Key Features"] [list] * Five segment sprites toggled individually * Update hooks from value and visibleParts [/list] [heading: "Constructor"] [table header] [ Parameter | Type | Description ] [ x | Number | X position of the bar ] [ y | Number | Y position of the bar ] [/table] [heading: "Properties"] [table header] [ Property | Type | Description ] [ parts | Array<Phaser.Sprite> | Segment sprites making up the bar ] [ visibleParts | Number | How many of the five segments are shown ] [ value | Number | Current rating 1-5 that fills segments ] [/table] [heading: "Methods"] [table header] [ Method | Parameters | Description ] [ update | () | Phaser lifecycle hook called every frame. Toggles each segment's visibility and frame based on visibleParts and value. ] [/table] [heading: "Example Usage (Modding)"] [codeblock javascript] // Modding usage example const bar = new SkillBar(100, 200); game.add.existing(bar); bar.value = 3; [/codeblock] [footer: "© Retora 2026"]