Dev - Lua Libraries

Lua Command: s3sprite.createAnchor


Return Values


SpriteAnchor anchor = s3sprite.createAnchor(int x, int y, ASpriteObject parent = null)


Creates a new sprite anchor. Sprite anchors are invisible objects which can be used as parents for other objects.

The position is specified in pixels and starts with (0|0) in the top left corner of the screen. It has to be specified with the parameters x and y. It is possible to change the position after creation with commands like s3sprite.setPosition.

You can optionally define a parent object with parent. The anchor will have no parent by default. You can also change the parent later with s3sprite.setParent.