Basic functions for performing collision with scene tiles. More...
Public Member Functions | |
| boolean | Point (number x, number y) |
| Checks for a tile collision at a specified point. | |
| integer | PointExtended (number x, number y, integer collisionField, integer collisionSide) |
| Checks for a tile collision at a specified point. | |
| boolean | Line (number x, number y, SensorDirection directionType, integer length, integer collisionField, integer compareAngle, Entity entity) |
| Checks for a tile collision in a straight line. | |
Basic functions for performing collision with scene tiles.
| boolean TileCollision.Line | ( | number | x, |
| number | y, | ||
| SensorDirection | directionType, | ||
| integer | length, | ||
| integer | collisionField, | ||
| integer | compareAngle, | ||
| Entity | entity ) |
Checks for a tile collision in a straight line.
| x | X position to start checking from. |
| y | Y position to start checking from. |
| directionType | Ordinal direction to check in. |
| length | How many pixels to check. |
| collisionField | Low (0) or high (1) field to check. |
| compareAngle | Only return a collision if the angle is within 0x20 of this value. If angle comparison is not desired, pass -1 to this parameter. |
| entity | Entity to write the values to. |
| boolean TileCollision.Point | ( | number | x, |
| number | y ) |
Checks for a tile collision at a specified point.
| x | X position to check. |
| y | Y position to check. |
| integer TileCollision.PointExtended | ( | number | x, |
| number | y, | ||
| integer | collisionField, | ||
| integer | collisionSide ) |
Checks for a tile collision at a specified point.
| x | X position to check. |
| y | Y position to check. |
| collisionField | Low (0) or high (1) field to check. |
| collisionSide | Which side of the tile to check for collision. (TOP = 1, RIGHT = 2, BOTTOM = 4, LEFT = 8, ALL = 15) |