Scripting API BBMOD_Sprite
BBMOD_Sprite
A constructor defined in BBMOD_Sprite.gml
Extends BBMOD_Resource
new BBMOD_Sprite([_file[, _sha1]])
Description
A sprite.
Arguments
Name
Type
Description
_file
String
The file to load the sprite from or undefined
.
_sha1
String
Expected SHA1 of the file. If the actual one does not match with this, then the model will not be loaded. Use undefined
if you do not want to check the SHA1 of the file.
Properties
Name
Description
Height
The height of the sprite.
Raw
The raw sprite resource of undefined
if it has not been loaded yet.
Width
The width of the sprite.
Inherited properties
Name
Description
IsLoaded
If false
then the resource has not been loaded yet.
Path
The path to the file from which was the resource loaded, or undefined
if the resource does not come from a file.
Persistent
If true
then the resource is persistent and it is not destroyed when method free
is used. Default value is false
.
Methods
Name
Description
get_texture
Retrieves a pointer to the texture.
Inherited methods
Name
Description
destroy
Frees memory used by the struct.
free
Releases a reference to the resource.
from_buffer
Loads the resource from a buffer.
from_file
Loads the resource from a file.
from_file_async
Asynchronnously loads the resource from a file.
ref
Retrieves a reference to the resource.
to_buffer
Writes the resource to a buffer.
to_file
Writes a resource to a file.
Throws
Do you find this page helpful?
Yes
No
Copyright © 2024, BlueBurn. Built on September 07, 2024 using
GMDoc .