Fork me on GitHub
View source

package haxepunk.masks

class Masklist


extends Hitbox

A Mask that can contain multiple Masks of one or various types.

Constructor

View source

new (masks : Array<Mask>) : Void

Constructor.


Parameters:
masks   

Masks to add to the list.

Variables

read only count : Int

Amount of Masks in the list.

Functions

View source

add (mask : Mask) : Mask

Adds a Mask to the list.


Parameters:
mask   

The Mask to add.


Returns:

The added Mask.

View source

getMask (index : Int = 0) : Mask

Gets a Mask from the list.


Parameters:
index   

The Mask index.


Returns:

The Mask at the index.

View source

remove (mask : Mask) : Mask

Removes the Mask from the list.


Parameters:
mask   

The Mask to remove.


Returns:

The removed Mask.

View source

removeAll () : Void

Removes all Masks from the list.

View source

removeAt (index : Int = 0) : Void

Removes the Mask at the index.


Parameters:
index   

The Mask index.