BuildingInstantiator
Instantiates a Placeable's scene, sets...
Instantiates a Placeable’s scene, sets its properties, and adds it to the world. Returns the instantiated Node2D if successful, otherwise null.[br][br] [code]p_placeable[/code]: [i]Placeable[/i] - The Placeable resource to instantiate[br] [code]p_preview[/code]: [i]Node2D[/i] - The preview node that holds the desired global_transform
Version: v5.0.0
Inherits: GBSystemsComponent
Source: building_instantiator.gd
Parsing: AST-based for maximum accuracy with symbol typing
Constants
DEFAULT_NAME
Value: "BuildingInstantiator"
WARNING_INVALID_PLACEABLE
Value: "Invalid placeable resource. Can't instantiate. [%s]"
WARNING_NO_PREVIEW
Value: "No preview instance provided to instantiate from. Returning null."
Variables
_indicator_context:
_building_state:
_building_settings:
Methods
resolve_gb_dependencies
Signature: resolve_gb_dependencies(p_container: GBCompositionContainer) -> void
p_container: GBCompositionContainer - Container with system dependencies
Returns: void
Parameters:
p_container: GBCompositionContainer
instantiate_building
Signature: instantiate_building(p_placeable: Placeable, p_preview: Node2D) -> Node2D
p_preview: Node2D - The preview node that holds the desired global_transform
Returns: Node2D
Parameters:
p_placeable: Placeablep_preview: Node2D