Pixel Ledges: 2D Platformer Kit with Sprites, Tilemaps, Wall Jumps and Dash
README.md
showcase.StyleStone
A stone in the Pixel Ledges Style Hall that switches the player who steps on it to one style. Put it on an entity standing on the floor (its position is the stone's feet) and set kind and value:
local s = entity.spawn("Stone", { position = { 12.5, 2, 0 } })
s.component.add("showcase.StyleStone", { kind = "feel", value = "moon" })
| Field | Default | What |
|---|---|---|
kind | character | character, feel, hud or camera. |
value | knight | The style id: a twoDKit character, feel, HUD style or camera style. |
It draws a pedestal (gold for characters, cyan for feels, magenta for HUD styles, green for cameras, from showcase/art/stones) with a live preview on top: an animated statue of the character, or the feel, HUD or camera icon. Coming within three tiles shows a card naming the style and what it does (showcase.hallCard); stepping on the stone applies it to your own player with the kit's own calls (PP.setCharacter, PP.setFeel, PP.setCamera, or the Hud entity's twoDKit.Hud2D.style). Character and feel sync to every player, exactly like the STYLES panel; HUD and camera are each player's own view. It needs twoDKit in the world and a Hud entity for HUD stones (PP.hud() makes one).