QueryItem2D

Inherits: RefCounted

Holds item information, such as score, projection_position and collided_with.

Description

Holds item information, such as score, projection_position and collided_with.

Properties

Node2D

collided_with

bool

is_filtered

false

Vector2

projection_position

Vector2(0, 0)

float

score

0.0

Methods

void

add_score_boolean(test_purpose: TestPurpose, value: bool, expected_boolean: bool)

void

add_score_direct(test_purpose: TestPurpose, normalized_value: float, scoring_factor: float)

void

add_score_numeric(test_purpose: TestPurpose, filter_type: FilterType, amount: float, min_threshold: float, max_threshold: float)

bool

apply_filter_boolean(value: bool, expected: bool)

bool

apply_filter_numeric(filter_type: FilterType, amount: float, min_threshold: float, max_threshold: float)

QueryItem2D

create(position: Vector2, collider: Node2D) static


Property Descriptions

Node2D collided_with 🔗

  • void set_collided_with(value: Node2D)

  • Node2D get_collided_with()

The node this query item is attached to. It could be the ground, an enemy, or any node that could be of interest for the testing phase.

This is provided by QueryGenerator3Ds.


bool is_filtered = false 🔗

  • void set_is_filtered(value: bool)

  • bool get_is_filtered()

If true, exclude this item from the tests and results.


Vector2 projection_position = Vector2(0, 0) 🔗

  • void set_projection_position(value: Vector2)

  • Vector2 get_projection_position()

The point of contact of this item. This is provided by QueryGenerator3Ds.


float score = 0.0 🔗

  • void set_score(value: float)

  • float get_score()

Current score of this item. These are normalized at the testing phase.


Method Descriptions

void add_score_boolean(test_purpose: TestPurpose, value: bool, expected_boolean: bool) 🔗

There is currently no description for this method. Please help us by contributing one!


void add_score_direct(test_purpose: TestPurpose, normalized_value: float, scoring_factor: float) 🔗

There is currently no description for this method. Please help us by contributing one!


void add_score_numeric(test_purpose: TestPurpose, filter_type: FilterType, amount: float, min_threshold: float, max_threshold: float) 🔗

There is currently no description for this method. Please help us by contributing one!


bool apply_filter_boolean(value: bool, expected: bool) 🔗

There is currently no description for this method. Please help us by contributing one!


bool apply_filter_numeric(filter_type: FilterType, amount: float, min_threshold: float, max_threshold: float) 🔗

Adds to the current score of this item.


QueryItem2D create(position: Vector2, collider: Node2D) static 🔗

Make a QueryItem3D with a position and a collider