Semi Mod Loader
|
Wrapper struct for tk2dSpriteCollectionData
that provides a cleaner interface and works transparently with anything that expects tk2dSpriteCollectionData
s.
More...
Public Member Functions | |
void | RefreshLookupDictionary () |
Refreshes the lookup dictionary for definitions. Done automatically by AddDefinition /AddDefinitions . More... | |
void | AddDefinition (SpriteDefinition def) |
Adds a single sprite definition to this collection. More... | |
void | AddDefinitions (params SpriteDefinition[] defs) |
Adds multiple sprite definitions at once to this collection. More... | |
int | GetIndex (string id) |
Gets the index of a sprite definition based on its ID. More... | |
SpriteDefinition? | GetDefinition (string id) |
Gets a sprite definition based on its ID. More... | |
Static Public Member Functions | |
static implicit | operator tk2dSpriteCollectionData (SpriteCollection s) |
Implicit cast operator that allows you to use SpriteCollection anywhere where t2kdSpriteCollectionData is expected. More... | |
static SpriteCollection | Construct (GameObject parent, string name, string unique_id, Material material, params SpriteDefinition[] defs) |
Constructs a new sprite collection. More... | |
static SpriteCollection | Load (Tk0dConfigParser.ParsedCollection parsed, string base_dir, string coll_namespace, Texture2D override_spritesheet=null) |
Load a Semi Collection format file from its parsed representation. The collection will be attached to the global modded sprite collection game object. More... | |
Public Attributes | |
tk2dSpriteCollectionData | Wrap |
Real tk2d object. More... | |
Properties | |
ProxyList< SpriteDefinition, tk2dSpriteDefinition > | SpriteDefinitions [get, set] |
The sprite definitions contained in this collection. More... | |
GameObject | GameObject [get] |
The game object this collection is a component of. More... | |
string | Name [get, set] |
Name of the sprite collection. More... | |
string | GUID [get, set] |
Globally Unique ID of the sprite collection. More... | |
Material[] | Materials [get, set] |
Array of materials. More... | |
Material[] | MaterialInstances [get, set] |
Array of instances of materials. More... | |
Wrapper struct for tk2dSpriteCollectionData
that provides a cleaner interface and works transparently with anything that expects tk2dSpriteCollectionData
s.
void Semi.SpriteCollection.AddDefinition | ( | SpriteDefinition | def | ) |
Adds a single sprite definition to this collection.
def | The definition. |
|
inline |
Adds multiple sprite definitions at once to this collection.
defs | The array of definitions. |
|
inlinestatic |
Constructs a new sprite collection.
parent | GameObject to add this collection to. |
name | Name. |
unique_id | Unique identifier. |
material | Material. |
defs | Optional array of preset definitions. |
|
inline |
Gets a sprite definition based on its ID.
null
if it doesn't exist.id | The ID of the definition. |
|
inline |
Gets the index of a sprite definition based on its ID.
id | The ID of the sprite definition. |
|
inlinestatic |
Load a Semi Collection format file from its parsed representation. The collection will be attached to the global modded sprite collection game object.
parsed | Parsed representation of the Semi Collection. |
base_dir | Base directory to load referenced assets from. |
coll_namespace | Namespace to use for the collection and the definitions. |
|
static |
Implicit cast operator that allows you to use SpriteCollection
anywhere where t2kdSpriteCollectionData
is expected.
|
inline |
Refreshes the lookup dictionary for definitions. Done automatically by AddDefinition
/AddDefinitions
.
tk2dSpriteCollectionData Semi.SpriteCollection.Wrap |
Real tk2d object.
|
get |
The game object this collection is a component of.
|
getset |
Globally Unique ID of the sprite collection.
|
getset |
Array of instances of materials.
|
getset |
Array of materials.
|
getset |
Name of the sprite collection.
|
getset |
The sprite definitions contained in this collection.