View source
extends Mask
extended by Circle, Grid, Masklist, Pixelmask, Polygon, SlopedGrid
package haxepunk.masks
class Hitbox
extends Mask
extended by Circle, Grid, Masklist, Pixelmask, Polygon, SlopedGrid
Uses parent's hitbox to determine collision. This class is used internally by HaxePunk, you don't need to use this class because this is the default behaviour of Entities without a Mask object.
Constructor
View source
Parameters:
new (width : Int = 1, height : Int = 1, x : Int = 0, y : Int = 0) : Void
Constructor.
Parameters:
width | Width of the hitbox. | |
height | Height of the hitbox. | |
x | X offset of the hitbox. | |
y | Y offset of the hitbox. |