Fork me on GitHub
View source

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

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.

Variables

height : Int

Height.

width : Int

Width.

x : Int

X offset.

y : Int

Y offset.