I cannot extend the Layer class in the game api because its constructor is protected. Does anybody have a clue why it is so??
I cannot extend the Layer class in the game api because its constructor is protected. Does anybody have a clue why it is so??
hi,
to force us to extends Layer subclasses like Sprite or TiledLayer,
hth,/**
* Creates a new Layer with the specified dimensions.
*
* This constructor is declared package scope to
* prevent developers from creating Layer subclasses
*
* By default, a Layer is visible and its upper-left
* corner is positioned at (0,0).
* @param width The width of the layer, in pixels
* @param height The height of the layer, in pixels
*
*/
regards,
Peter
better write your own layer class. they are already available in many forums, just google on it.
Mobile Game Development - Smackall.com