RectCollisionTestingSetup
Sets up area_2d and collision_shape
Sets up area_2d and collision_shape
Version: v5.0.0
Inherits: RefCounted
Source: rect_collision_testing_setup.gd
Parsing: AST-based for maximum accuracy with symbol typing
Constants
TRANSPARENCY_LEVEL
Value: Color(1,1,1,0.1)
Variables
shape_owner:
shapes: Array[Shape2D]
Type: Array[Shape2D]
area_2d:
Testing area
collision_shape:
rect_shape:
Testing rect shape
test_area_name
Default: "IndicatorSetupTestingArea"
_debug_area_colors
Default: [
_debug_mode
Default: true # Used in development to show shapes.
Methods
_area_setup
Signature: _area_setup(p_area_rect : Rect2: Variant) -> void
Sets up area_2d and collision_shape
Returns: void
Parameters:
p_area_rect : Rect2: Variant
_create_rect_shape
Signature: _create_rect_shape(p_rect_size: Vector2) -> RectangleShape2D
area_2d.global_transform = Transform2D(0, Vector2.ONE, 0, area_2d.global_position) # Position based on parent owner
Returns: RectangleShape2D
Parameters:
p_rect_size: Vector2
free_nodes
Signature: free_nodes() -> void
Returns: void
validate
Signature: validate() -> Array
Returns: Array
toggle_debug
Signature: toggle_debug(p_show : bool: Variant) -> void
Returns: void
Parameters:
p_show : bool: Variant