#title Nirvana2D [RCBasic Doc]
#header Nirvana2D API
Type Nirvana_Sprite
#list ul
#li Dim Name$
#li Dim BaseName$
#li Dim Sprite_ID
#li Dim Animation_Name_Index
#li Dim Animation_Count
#/list
Type Nirvana_Shape
#list ul
#li Dim Sprite_ID
#li Dim ShapeType
#/list
Function Nirvana_CreateSprite(spriteDefinition_name$, sprite_name$) As Nirvana_Sprite
#list ul
#li Create a Nirvana Sprite
#list ul
#li NOTE: spriteDefinition_name$ is the name of the base sprite created in the Sprite Editor
#/list
#/list
Function Nirvana_GetLayerSpriteCount(layer_index)
#list ul
#li Returns the number of sprites in a layer
#/list
Function Nirvana_GetLayerSpriteIndex(layer_index, sprite_name$)
#list ul
#li Returns the Nirvana sprite index of the given sprite name in the given layer or -1 if sprite is not found
#/list
Function Nirvana_GetLayerShapeCount(layer_index)
#list ul
#li Returns the number of stage collision shapes in the given layer
#/list
Function Nirvana_GetSpriteID(sprite_index)
#list ul
#li Returns the RCBasic sprite id of the given Nirvana sprite index or -1 if the sprite index is not valid
#list ul
#li NOTE: If the sprite is detached then this will return the ID of the render sprite
#/list
#/list
Function Nirvana_GetSpriteName$(sprite_index)
#list ul
#li Returns the sprite name of the given Nirvana sprite index or an empty string if sprite index is not valid
#/list
Function Nirvana_GetSpriteDefinitionName$(sprite_index)
#list ul
#li Returns the sprite definition name of the given sprite index
#list ul
#li NOTE: Sprite Definition name is the name of the base sprite created in the Sprite Editor and not the name of the sprite in the stage
#li NOTE: There is almost no reason to get this definition name unless you wanted to look up sprites in the stage by the base sprite
#/list
#/list
Function Nirvana_GetSpriteIsDetached(sprite_index)
#list ul
#li Returns true if the sprite has a detached render body and dynamics body
#/list
Function Nirvana_GetDetachedSpriteID(sprite_index)
#list ul
#li Returns the sprite dynamics body ID
#list ul
#li NOTE: This is the body that should be used for physics operations
#/list
#/list
Function Nirvana_GetSpriteAnimationCount(sprite_index)
#list ul
#li Returns the number of animations for the given Nirvana sprite index
#/list
Function Nirvana_GetSpriteAnimationName$(sprite_index, animation_num)
#list ul
#li Returns the name of the given Nirvana Sprite Index animation number
#/list