LAYERSPEEDMODEL namespace JJ2+
How layers scroll
Enums
- enum LayerSpeedModel { NORMAL = 0 partially supported, LAYER8 = 1 partially supported, BOTHSPEEDS = 2 partially supported, FROMSTART = 3, FITLEVEL = 4, SPEEDMULTIPLIERS = 5 } JJ2+
- How the speed properties of a layer position it on one axis, see jjLAYER::xSpeedModel
Enum documentation
enum LAYERSPEEDMODEL:: LayerSpeedModel JJ2+
How the speed properties of a layer position it on one axis, see jjLAYER::xSpeedModel
| Enumerators | |
|---|---|
| NORMAL |
The default model The layer follows the camera by its speed, or scrolls by its automatic speed if it has one. |
| LAYER8 |
Fixed to the view, the usual model of layer 8 |
| BOTHSPEEDS |
Both the speed and the automatic speed move the layer For example, clouds that drift constantly while also following the camera a little. |
| FROMSTART |
Like BOTHSPEEDS, but positioned from the top left corner of the level The origin of the layer doesn't depend on the resolution. Ignores jjLAYER::limitVisibleRegion. |
| FITLEVEL |
Scrolls the layer so it exactly spans the level The speeds are ignored: one edge of the layer is visible at one edge of the level and the opposite edge at the opposite edge of the level, so a larger layer moves faster. |
| SPEEDMULTIPLIERS |
Speeds are multiples of the size of the view With the camera at the top or left edge of the level, the layer is offset by the view size times its speed, at the bottom or right edge by the view size times its automatic speed, and it moves smoothly in between. Ignores jjLAYER::limitVisibleRegion. |