Interface ITextureCache
A single cache which stores all of the textures in a single place.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface ITextureCache
Methods
| Improve this Doc View SourceGetTexture(String, Func<String, ITexture>)
Gets a texture (or creates a texture using the factory function if the texture doesn't exist).
Declaration
ITexture GetTexture(string id, Func<string, ITexture> factory)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The texture id (path on the file system, for example). |
System.Func<System.String, ITexture> | factory | A function to create the texture if the texture does not exist already. |
Returns
Type | Description |
---|---|
ITexture | The texture. |
RemoveTexture(String)
Removes the texture from the cache.
Declaration
void RemoveTexture(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The texture id (path on the file system, for example). |
TryGetTexture(String, out ITexture)
Tries to get the texture.
Declaration
bool TryGetTexture(string id, out ITexture texture)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The texture id (path on the file system, for example). |
ITexture | texture | The returned texture (or null if it doesn't exist). |
Returns
Type | Description |
---|---|
System.Boolean |
|