class
#include <ldtk_layer_definition.h>
layer_definition
Public functions
-
auto get_int_grid_value_info(int int_grid_value) const -> const int_
grid_ value_ info* constexpr - (Only IntGrid layer) Gets the info associated with the IntGrid value for this layer.
-
auto get_int_grid_value_group_info(int group_uid) const -> const int_
grid_ value_ group_ info* constexpr - (Only IntGrid layer) Gets the info associated with the IntGrid value group for this layer.
-
auto type() const -> layer_
type constexpr - Type of the layer.
- auto display_opacity() const -> bn::fixed constexpr
- Opacity of the layer (0 to 1.0)
- auto grid_size() const -> int constexpr
- Width and height of the grid in pixels.
- auto identifier() const -> gen::layer_ident constexpr
- User defined unique identifier.
-
auto int_grid_values() const -> const bn::span<const int_
grid_ value_ info>& constexpr - (Only IntGrid layer) An array that defines extra optional info for each IntGrid value.
-
auto int_grid_value_groups() const -> const bn::span<const int_
grid_ value_ group_ info>& constexpr - (Only IntGrid layer) Group informations for IntGrid values
- auto parallax_factor_x() const -> bn::fixed constexpr
- Parallax horizontal factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
- auto parallax_factor_y() const -> bn::fixed constexpr
- Parallax vertical factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
- auto uid() const -> int constexpr
- Unique Int Intidentifier.
Function documentation
const int_ grid_ value_ info* ldtk:: layer_definition:: get_int_grid_value_info(int int_grid_value) const constexpr
(Only IntGrid layer) Gets the info associated with the IntGrid value for this layer.
Parameters | |
---|---|
int_grid_value | Actual IntGrid value. |
Returns | Pointer to the info, or nullptr if it doesn't exist. |
const int_ grid_ value_ group_ info* ldtk:: layer_definition:: get_int_grid_value_group_info(int group_uid) const constexpr
(Only IntGrid layer) Gets the info associated with the IntGrid value group for this layer.
Parameters | |
---|---|
group_uid | IntGrid value group UID. |
Returns | Pointer to the info, or nullptr if it doesn't exist. |
const bn::span<const int_ grid_ value_ info>& ldtk:: layer_definition:: int_grid_values() const constexpr
(Only IntGrid layer) An array that defines extra optional info for each IntGrid value.
const bn::span<const int_ grid_ value_ group_ info>& ldtk:: layer_definition:: int_grid_value_groups() const constexpr
(Only IntGrid layer) Group informations for IntGrid values