map.TestCollision

Test if the region has collided with a map tile.

Syntax

map.TestCollision(x, y, w, h)

Parameters

  • x - Horizontal position of the rectangle.
  • y - Vertical position of the rectangle.
  • w - Width of the rectangle.
  • h - Height of the rectangle.

Returns

True if collision occurred, otherwise false.

About

LameMap has collision support built in. You can test whether or not collision has occurred with map.TestCollision, passing the rectangle to test.