Class Punx.Screen
Defined in: punx.dist.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Punx.Screen(args)
Represents a collection of sprites to be drawn to the canvas.
|
Field Attributes | Field Name and Description |
---|---|
Optional background image
|
|
Required: {Punx.Grid} reference
|
|
List of {Punx.Sprite} instances
|
Method Attributes | Method Name and Description |
---|---|
<private> |
_draw()
Called by update() if needed.
|
update()
Called by the game loop.
|
Class Detail
Punx.Screen(args)
Represents a collection of sprites to be drawn to the canvas. Only the active screen is drawn.
- Parameters:
- {object} args
- Construction values for public properties.
Field Detail
{Image}
bg
Optional background image
{Punx.Grid}
grid
Required: {Punx.Grid} reference
{Punx.Sprites[]}
sprites
List of {Punx.Sprite} instances
- Default Value:
- []
Method Detail
<private>
_draw()
Called by update() if needed.
update()
Called by the game loop. Update all sprites and redraw if needed.