Collider

Represents a collider composed of multiple rectangles

Constructors

this
this(const Texture tex)

Initializes a collider from a texture, all pixels with alpha > 127 collide

Members

Functions

intersects
bool intersects(Collider other)

Returns true if two colliders intersect

merge
void merge(Collider other)

Merges colliders

replicate
Collider replicate(uint times)

Replicates a collider horizontally

translate
Collider translate(Vector2f vec)

Returns a collider translated by the given vector

Meta