CollisionObjectTestFactory

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Source File: /addons/grid_building/test/factories/collision_object_test_factory.gd

Extends: RefCounted

Constants

  • Constant: DEFAULT_COLLISION_LAYER: int = 1 - Default collision layer for test objects
  • Constant: DEFAULT_COLLISION_MASK: int = 1 - Default collision mask for test objects
  • Constant: DEMO_BLACKSMITH_COLLISION_LAYER: int = 2560 - Demo blacksmith collision layer (used in demo scenes)
  • Constant: DEMO_BLACKSMITH_COLLISION_MASK: int = 1536 - Demo blacksmith collision mask (used in demo scenes)
  • Constant: DEFAULT_TEST_SIZE: Vector2 = Vector2(32, 32) - Default test object size (32x32 pixels)
  • Constant: DEFAULT_CIRCLE_RADIUS: float = 16.0 - Default circle radius for test objects
  • Constant: DEFAULT_CAPSULE_RADIUS: float = 16.0 - Default capsule radius
  • Constant: DEFAULT_CAPSULE_HEIGHT: float = 32.0 - Default capsule height
  • Constant: SMALL_CIRCLE_RADIUS: float = 12.0 - Small circle radius for tests
  • Constant: DIAMOND_DEFAULT_WIDTH: float = 32.0 - Diamond shape default dimensions
  • Constant: DIAMOND_DEFAULT_HEIGHT: float = 32.0

Public Methods

create_static_body_with_rect

1
2
3
4
5
create_static_body_with_rect(
    test_suite: GdUnitTestSuite,
    size: Vector2,
    position: Vector2 = Vector2.ZERO
) -> StaticBody2D

Flags: static

Creates a StaticBody2D with a rectangular collision shape


create_static_body_with_circle

1
2
3
4
5
create_static_body_with_circle(
    test_suite: GdUnitTestSuite,
    radius: float,
    position: Vector2 = Vector2.ZERO
) -> StaticBody2D

Flags: static

Creates a StaticBody2D with a circular collision shape


create_static_body_with_polygon

1
2
3
4
5
create_static_body_with_polygon(
    test_suite: GdUnitTestSuite,
    polygon_points: PackedVector2Array,
    position: Vector2 = Vector2.ZERO
) -> StaticBody2D

Flags: static

Creates a StaticBody2D with a polygon collision shape


create_area_with_polygon

1
2
3
4
5
create_area_with_polygon(
    test_suite: GdUnitTestSuite,
    polygon_points: PackedVector2Array,
    position: Vector2 = Vector2.ZERO
) -> Area2D

Flags: static

Creates an Area2D with a polygon collision shape


create_area_with_rect

1
2
3
4
5
create_area_with_rect(
    test_suite: GdUnitTestSuite,
    size: Vector2,
    position: Vector2 = Vector2.ZERO
) -> Area2D

Flags: static

Creates an Area2D with a rectangular collision shape


create_area_with_circle

1
2
3
4
5
create_area_with_circle(
    test_suite: GdUnitTestSuite,
    radius: float,
    position: Vector2 = Vector2.ZERO
) -> Area2D

Flags: static

Creates an Area2D with a circular collision shape


create_isometric_blacksmith

1
2
3
4
create_isometric_blacksmith(
    test_suite: GdUnitTestSuite,
    position: Vector2 = Vector2.ZERO
) -> StaticBody2D

Flags: static

Creates an isometric blacksmith building with proper collision layers


create_polygon_test_object

1
2
3
4
create_polygon_test_object(
    test_suite: GdUnitTestSuite,
    parent: Node
) -> StaticBody2D

Flags: static

Creates a polygon test object for testing indicator behavior


instance_placeable

1
2
3
4
5
instance_placeable(
    p_test : GdUnitTestSuite,
    p_placeable : Placeable,
    p_parent : Node
) -> Node2D

Flags: static



Grid Building v5.0.8 | Generated 24/05/2026