Powerplay: Abilities, Cooldowns and Status Effects Kit
README.md
AbilityBar
Draws a character's ability bar on this peer's screen. It can go on any entity, and every field is NoSync, so each peer draws its own.
| field | default | meaning |
|---|---|---|
layout | auto | hotbar, moba, radial, pips, orbs, touch. auto follows AK.setBarLayout. |
style | auto | scifi, fantasy, cartoon, pixel, minimal. auto follows AK.setUiStyle. |
target | "" | An entity name or id. Empty means the local player's character. |
anchor | auto | bottomCenter, or bottomRight for touch. Any of the nine anchors. |
scale | 1 | Multiplies the automatic screen scale (1 at 1280x720, at least 0.85 on a phone). |
compact | false | Smaller slots. |
visible | true | |
preview | false | Draws a sample bar when there is no character, while editing as well. |
The bar stays inside the safe area and out of controlsKit's on-screen buttons. If it is wider than the screen, it shrinks to fit. In the touch layout every button is tappable and casts its slot through AK.cast (onCallback ← "abilitiesKit.cast:<slot>"). Methods: castSlot(slot) and rect().
Each bar registers its own screen, abilitiesKit.bar.<entityId>, so its clicks reach this component.