GBLevelContext
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Organizes object requirements for building onto a game level for GBCompositeContainers
Source File: addons/grid_building/components/gb_level_context.gd
Extends: GBGameNode
Exported Properties
Property:
target_map : TileMapLayer- The TileMapLayer to use as the tile selection target for the grid targeting_stateProperty:
maps : Array[TileMapLayer]All maps in the game level.
Sets this data on the targeting_state.maps during gameplay.
Auto-include behavior: If
target_mapis assigned but this array is empty, thetarget_mapwill automatically be included in this array. Similarly, iftarget_mapis assigned but not present in this array, it will be automatically added. This ensures the target map is always available for targeting operations.Property:
objects_parent: Node2D- Where objects should be placed into the scene under in the scene hierarchy
Private Properties
- Property:
_targeting_state : [GridTargetingState](./grid-targeting-state/)(private) - Property:
_building_state : [BuildingState](./building-state/)(private) - Property:
_logger : [GBLogger](./gb-logger/)(private)
Public Methods
resolve_gb_dependencies
apply_to
Applies level configuration to targeting and building states. Assigns target map, maps array, and objects parent to the appropriate states.
p_targeting: GridTargetingState - Targeting state to configure with level maps
p_building: BuildingState - Building state to configure with placement parent
get_editor_issues
Validate setup and return a list of issues with the current object