pub struct Level {Show 15 fields
pub bg_color: String,
pub bg_pos: Option<BackgroundPosition>,
pub neighbours: Vec<Neighbour>,
pub bg_rel_path: Option<String>,
pub external_rel_path: Option<String>,
pub field_instances: Vec<FieldInstance>,
pub identifier: String,
pub iid: String,
pub layer_instances: Option<Vec<LayerInstance>>,
pub px_hei: Int,
pub px_wid: Int,
pub uid: Int,
pub world_depth: Int,
pub world_x: Int,
pub world_y: Int,
}Fields§
§bg_color: StringBackground color of the level (same as bgColor, except the default value is automatically used here if its value is null)
bg_pos: Option<BackgroundPosition>Position informations of the background image, if there is one.
neighbours: Vec<Neighbour>An array listing all other levels touching this one on the world map. Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.
bg_rel_path: Option<String>The optional relative path to the level background image.
external_rel_path: Option<String>This value is not null if the project option “Save levels separately” is enabled. In this case, this relative path points to the level Json file.
field_instances: Vec<FieldInstance>An array containing this level custom field values.
identifier: StringUser defined unique identifier
iid: StringUnique instance identifier
layer_instances: Option<Vec<LayerInstance>>An array containing all Layer instances. IMPORTANT: if the project option “Save levels separately” is enabled, this field will be null. This array is sorted in display order: the 1st layer is the top-most and the last is behind.
px_hei: IntHeight of the level in pixels
px_wid: IntWidth of the level in pixels
uid: IntUnique Int identifier
world_depth: IntIndex that represents the “depth” of the level in the world. Default is 0, greater means “above”, lower means “below”. This value is mostly used for display only and is intended to make stacking of levels easier to manage.
world_x: IntWorld X coordinate in pixels. Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, the value is always -1 here.
world_y: IntWorld Y coordinate in pixels. Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, the value is always -1 here.