Semi Mod Loader
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Semi.Sprite Struct Reference

Wrapper struct for tk2dSprite that provides a cleaner interface and works transparently with anything that expects tk2dSprites. More...

Public Member Functions

void CopyTo (Sprite target)
 Copies all fields from this sprite into another existing sprite instance. More...
 

Static Public Member Functions

static implicit operator tk2dSprite (Sprite s)
 Implicit cast operator that allows you to use Sprite anywhere where t2kdSprite is expected. More...
 
static Sprite Construct (GameObject parent, SpriteCollection collection, int spritedef_id)
 Construct a new sprite on the specified GameObject using the collection and the sprite definition index. More...
 

Public Attributes

tk2dSprite Wrap
 Real tk2d object. More...
 

Properties

GameObject GameObject [get]
 The game object that this sprite is attached to. More...
 
SpriteCollection Collection [get, set]
 The currently assigned sprite collection. More...
 
string CurrentSpriteID [get, set]
 The string ID of the currently displayed sprite definition. More...
 
BoxCollider BoxCollider [get, set]
 The box collider. More...
 
BoxCollider2D BoxCollider2D [get, set]
 The 2D box collider. More...
 
MeshColliderSettings MeshColliderSettings [get, set]
 The mesh collider settings. More...
 
int SortingOrder [get, set]
 The sorting order/render layer. More...
 
bool AutodetectFootprint [get, set]
 Decides whether to autodetect footprint. More...
 
bool AutomaticallyManagesDepth [get, set]
 Decides whether Z depth/sorting order should be managed automatically. More...
 
IntVector2 CustomFootprint [get, set]
 Defines a custom footprint. More...
 
bool UseTrimmedBoundsForDepth [get, set]
 Decides whether trimmed (whitespace-excluded) bounds should be used for automatically deciding depth. More...
 
bool FlipHorizontally [get, set]
 Flip horizontally. More...
 
bool FlipVertically [get, set]
 Flip vertically. More...
 

Detailed Description

Wrapper struct for tk2dSprite that provides a cleaner interface and works transparently with anything that expects tk2dSprites.

Member Function Documentation

◆ Construct()

static Sprite Semi.Sprite.Construct ( GameObject  parent,
SpriteCollection  collection,
int  spritedef_id 
)
inlinestatic

Construct a new sprite on the specified GameObject using the collection and the sprite definition index.

Returns
The newly constructed sprite.
Parameters
parentGameObject to add this sprite to.
collectionThe sprite collection to set.
spritedef_idThe sprite definition index to set as the current sprite.

◆ CopyTo()

void Semi.Sprite.CopyTo ( Sprite  target)
inline

Copies all fields from this sprite into another existing sprite instance.

Parameters
targetTarget sprite.

◆ operator tk2dSprite()

static implicit Semi.Sprite.operator tk2dSprite ( Sprite  s)
static

Implicit cast operator that allows you to use Sprite anywhere where t2kdSprite is expected.

Member Data Documentation

◆ Wrap

tk2dSprite Semi.Sprite.Wrap

Real tk2d object.

Property Documentation

◆ AutodetectFootprint

bool Semi.Sprite.AutodetectFootprint
getset

Decides whether to autodetect footprint.

◆ AutomaticallyManagesDepth

bool Semi.Sprite.AutomaticallyManagesDepth
getset

Decides whether Z depth/sorting order should be managed automatically.

◆ BoxCollider

BoxCollider Semi.Sprite.BoxCollider
getset

The box collider.

◆ BoxCollider2D

BoxCollider2D Semi.Sprite.BoxCollider2D
getset

The 2D box collider.

◆ Collection

SpriteCollection Semi.Sprite.Collection
getset

The currently assigned sprite collection.

◆ CurrentSpriteID

string Semi.Sprite.CurrentSpriteID
getset

The string ID of the currently displayed sprite definition.

◆ CustomFootprint

IntVector2 Semi.Sprite.CustomFootprint
getset

Defines a custom footprint.

◆ FlipHorizontally

bool Semi.Sprite.FlipHorizontally
getset

Flip horizontally.

◆ FlipVertically

bool Semi.Sprite.FlipVertically
getset

Flip vertically.

◆ GameObject

GameObject Semi.Sprite.GameObject
get

The game object that this sprite is attached to.

◆ MeshColliderSettings

MeshColliderSettings Semi.Sprite.MeshColliderSettings
getset

The mesh collider settings.

◆ SortingOrder

int Semi.Sprite.SortingOrder
getset

The sorting order/render layer.

◆ UseTrimmedBoundsForDepth

bool Semi.Sprite.UseTrimmedBoundsForDepth
getset

Decides whether trimmed (whitespace-excluded) bounds should be used for automatically deciding depth.


The documentation for this struct was generated from the following file: