Class SpriteHandler
A handler class for adding custom sprites into the game.
public static class SpriteHandler
- Inheritance
-
SpriteHandler
- Inherited Members
Methods
RegisterSprite(Group, string, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, Atlas.Sprite sprite)
Parameters
group
SpriteManager.Group- The sprite group this sprite will be added to.
id
string- The sprite internal identifier.
sprite
Atlas.Sprite- The sprite to be added.
RegisterSprite(Group, string, string)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, string filePathToImage)
Parameters
group
SpriteManager.Group- The sprite group.
id
string- The sprite internal identifier.
filePathToImage
string- The file path to image.
- See Also
RegisterSprite(Group, string, string, TextureFormat)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, string filePathToImage, TextureFormat format)
Parameters
group
SpriteManager.Group- The sprite group.
id
string- The sprite internal identifier.
filePathToImage
string- The file path to image.
format
TextureFormatThe texture format. By default, this uses UnityEngine.TextureFormat.BC7.
https://docs.unity3d.com/ScriptReference/TextureFormat.BC7.html
Don't change this unless you really know what you're doing.
- See Also
RegisterSprite(Group, string, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, Sprite sprite)
Parameters
group
SpriteManager.Group- The sprite group this sprite will be added to.
id
string- The sprite internal identifier.
sprite
Sprite- The sprite to be added.
RegisterSprite(TechType, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, Atlas.Sprite sprite)
Parameters
type
TechType- The techtype paired to this sprite.
sprite
Atlas.Sprite- The sprite to be added.
RegisterSprite(TechType, string)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, string filePathToImage)
Parameters
type
TechType- The techtype paired to this sprite.
filePathToImage
string- The file path to image to be converted into a sprite.
- See Also
RegisterSprite(TechType, string, TextureFormat)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, string filePathToImage, TextureFormat format)
Parameters
type
TechType- The techtype paired to this sprite.
filePathToImage
string- The file path to image to be converted into a sprite.
format
TextureFormatThe texture format. By default, this uses UnityEngine.TextureFormat.BC7.
https://docs.unity3d.com/ScriptReference/TextureFormat.BC7.html
Don't change this unless you really know what you're doing.
- See Also
RegisterSprite(TechType, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, Sprite sprite)
Parameters
type
TechType- The techtype paired to this sprite.
sprite
Sprite- The sprite to be added.