Packagenet.flashpunk.graphics
Classpublic class Graphiclist
InheritanceGraphiclist Inheritance Graphic Inheritance Object

A Graphic that can contain multiple Graphics of one or various types. Useful for drawing sprites with multiple different parts, etc.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean = false
If the graphic should update.
Graphic
  children : Vector.<Graphic>
[read-only] All Graphics in this list.
Graphiclist
  count : uint
[read-only] Amount of Graphics in this list.
Graphiclist
 Inheritedrelative : Boolean = true
If the graphic should render at its position relative to its parent Entity's position.
Graphic
 InheritedscrollX : Number = 1
X scrollfactor, effects how much the camera offsets the drawn graphic.
Graphic
 InheritedscrollY : Number = 1
Y scrollfactor, effects how much the camera offsets the drawn graphic.
Graphic
 Inheritedvisible : Boolean = true
If the graphic should render.
Graphic
 Inheritedx : Number = 0
X offset.
Graphic
 Inheritedy : Number = 0
Y offset.
Graphic
Protected Properties
 PropertyDefined By
 Inheritedassign : Function
Graphic
Public Methods
 MethodDefined By
  
Graphiclist(... graphic)
Constructor.
Graphiclist
  
Adds the Graphic to the list.
Graphiclist
  
Removes the Graphic from the list.
Graphiclist
  
removeAll():void
Removes all Graphics from the list.
Graphiclist
  
removeAt(index:uint = 0):void
Removes the Graphic from the position in the list.
Graphiclist
 Inherited
render(target:BitmapData, point:Point, camera:Point):void
Renders the graphic to the screen buffer.
Graphic
 Inherited
update():void
Updates the graphic.
Graphic
Property Detail
childrenproperty
children:Vector.<Graphic>  [read-only]

All Graphics in this list.


Implementation
    public function get children():Vector.<Graphic>
countproperty 
count:uint  [read-only]

Amount of Graphics in this list.


Implementation
    public function get count():uint
Constructor Detail
Graphiclist()Constructor
public function Graphiclist(... graphic)

Constructor.

Parameters
... graphic — Graphic objects to add to the list.
Method Detail
add()method
public function add(graphic:Graphic):Graphic

Adds the Graphic to the list.

Parameters

graphic:Graphic — The Graphic to add.

Returns
Graphic — The added Graphic.
remove()method 
public function remove(graphic:Graphic):Graphic

Removes the Graphic from the list.

Parameters

graphic:Graphic — The Graphic to remove.

Returns
Graphic — The removed Graphic.
removeAll()method 
public function removeAll():void

Removes all Graphics from the list.

removeAt()method 
public function removeAt(index:uint = 0):void

Removes the Graphic from the position in the list.

Parameters

index:uint (default = 0) — Index to remove.