A 2D texture that can be displayed on screen.
Constructor
new(x:Int, y:Int, sprite:Texture)
Constructor used to initialize internal variables. It is not recommended to override this! use init
instead!!
Parameters:
x | X position of the sprite |
---|---|
y | Y position of the sprite |
sprite | Texture of the sprite |
Variables
Methods
center(?axies:Axies):Void
Automatically centers the sprite on the scree
Parameters:
axies | the axies to center the sprite on. Takes either |
---|
unload():Void
Used to unload and free all allocated resources, it is not recommended to override this, Called automatically upon scene switch or when un-registering the sprite.