Sprites

Overview

Return Value
Function

integer

GetLastFrameOfAnimation(Sprite sprite, string? animation)

boolean

SpriteEquals(Sprite sprite1, Sprite sprite2, integer layer, integer xStart, integer xFinish, integer xIncrement, integer yStart, integer yFinish, integer yIncrement)

boolean

TexelEquals(Sprite sprite1, Sprite sprite2, Vector position, integer layer)

Functions

GetLastFrameOfAnimation()

integer GetLastFrameOfAnimation(Sprite sprite, string? animation)

Helper function to get the last frame of a certain animation.

SpriteEquals()

boolean SpriteEquals(Spritesprite1,Sprite sprite2, integer layer, integer xStart, integer xFinish, integer xIncrement, integer yStart, integer yFinish, integer yIncrement)

Helper function to check if two sprite layers have the same sprite sheet by using the Sprite.GetTexel method. Since checking every single texel in the entire sprite is very expensive, this function requires you to specify the range of texels to check.

TexelEquals()

boolean TexelEquals(Spritesprite1,Spritesprite2,Vector position, integer layer)

Helper function to check if two texels on a sprite are equivalent to each other.

Last updated