Fork me on GitHub
View source

package haxepunk.graphics

class BaseGraphicList<T>


extends Graphic

defined in haxepunk.graphics.Graphiclist;

Constructor

View source

new (graphic : Array<T>) : Void

Constructor.


Parameters:
graphic   

Graphic objects to add to the list.

Variables

read only children : Array<T>

All Graphics in this list.

read only count : Int

Amount of Graphics in this list.

Functions

View source

add (graphic : T) : T

Adds the Graphic to the list.


Parameters:
graphic   

The Graphic to add.


Returns:

The added Graphic.

View source

destroy () : Void

Destroys the list of graphics

View source

get (i : Int) : T

Returns the Graphic from the list.


Parameters:
i   

The index of the array.


Returns:

The graphic in n index.

View source

remove (graphic : T) : T

Removes the Graphic from the list.


Parameters:
graphic   

The Graphic to remove.


Returns:

The removed Graphic.

View source

removeAll () : Void

Removes all Graphics from the list.

View source

removeAt (index : Int = 0) : Void

Removes the Graphic from the position in the list.


Parameters:
index   

Index to remove.

View source

render (point : Vector2, camera : Camera) : Void

@private Renders the Graphics in the list.