SpriteManager 2
 All Classes Functions Variables Enumerations Enumerator Properties
SpriteRoot Class Referenceabstract

The root class of all sprites. Does not assume any animation capabilities or atlas packing. More...

Inheritance diagram for SpriteRoot:
IEZLinkedListItem< T > SpriteBase AutoSpriteBase ManualSprite PackedSprite

Public Types

enum  SPRITE_PLANE
 
enum  ANCHOR_METHOD
 
enum  WINDING_ORDER
 

Public Member Functions

delegate void SpriteResizedDelegate (float newWidth, float newHeight, SpriteRoot sprite)
 
virtual void Clear ()
 Resets important sprite values to defaults for reuse. More...
 
virtual void Copy (SpriteRoot s)
 Copies all the vital attributes of another sprite. More...
 
virtual void Delete ()
 If non-managed, call Delete() before destroying this component or the GameObject to which it is attached. Memory leaks can ensue otherwise. More...
 
void CalcSize ()
 Recalculates the width and height of the sprite based upon the change in its UV dimensions (autoResize) or on the current camera's disposition (pixelPerfect). More...
 
virtual void SetSize (float w, float h)
 Sets the physical dimensions of the sprite in the plane selected More...
 
virtual void TruncateRight (float pct)
 Truncates the right edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation More...
 
virtual void TruncateLeft (float pct)
 Truncates the left edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation More...
 
virtual void TruncateTop (float pct)
 Truncates the top edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation More...
 
virtual void TruncateBottom (float pct)
 Truncates the bottom edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation More...
 
virtual void Untruncate ()
 Removes any truncation. More...
 
virtual void Unclip ()
 Removes any clipping that is being applied to the sprite. More...
 
virtual void UpdateUVs ()
 Applies any changes to the UVs to the actual sprite mesh. More...
 
virtual void SetColor (Color c)
 Sets the sprite's color to the specified color. More...
 
void CalcPixelToUV ()
 Recalculates the pixel-to-UV ratio based on the current texture. More...
 
void SetTexture (Texture2D tex)
 Changes the texture to be used by the sprite's material. NOTE: This will cause the sprite not to batch with other sprites and can only be used with non-managed sprites. More...
 
void SetMaterial (Material mat)
 Changes the material to be used by the sprite. NOTE: This can only be used with non-managed sprites. More...
 
void UpdateCamera ()
 Updates any camera-dependent settings, such as the calculated pixel-perfect size. Use this with BroadcastMessage() to do bulk re-calculation of object sizes whenever your screensize/resolution changes at runtime. More...
 
void SetCamera ()
 A no-argument version of SetCamera() that simply re-assigns the same camera to the object, forcing it to recalculate all camera-dependent calculations. More...
 
virtual void SetCamera (Camera c)
 Sets the camera to use when calculating a pixel-perfect sprite size. More...
 
virtual void Hide (bool tf)
 Hides or displays the sprite by disabling/enabling the sprite's mesh renderer component, or if managed, sets the mesh size to 0. More...
 
bool IsHidden ()
 Returns whether the sprite is currently set to be hideAtStart (whether its mesh renderer component is enabled). More...
 
void SetBleedCompensation (float x, float y)
 Sets the bleed compensation to use (see bleedCompensation). More...
 
void SetBleedCompensation (Vector2 xy)
 Sets the bleed compensation to use (see bleedCompensation). More...
 
void SetPlane (SPRITE_PLANE p)
 Sets the plane in which the sprite is to be drawn. See: SPRITE_PLANE More...
 
void SetWindingOrder (WINDING_ORDER order)
 Sets the winding order to use. See WINDING_ORDER. More...
 
void SetDrawLayer (int layer)
 Sets the draw layer of the sprite (only applies to managed sprites). More...
 
void SetFrameInfo (SPRITE_FRAME fInfo)
 Sets the sprite's frame info, which includes UVs, offsets, etc. More...
 
void SetUVs (Rect uv)
 Sets the sprite's UVs to the specified values. More...
 
void SetUVsFromPixelCoords (Rect pxCoords)
 Sets the sprite's UVs from pixel coordinates. More...
 
Rect GetUVs ()
 Returns the current UV coordinates of the sprite (before bleed compensation). More...
 
Vector3[] GetVertices ()
 Returns a reference to the sprite's vertices. NOTE: You can only directly modify the sprite's vertices if it is a non-managed sprite. More...
 
Vector3 GetCenterPoint ()
 Gets the center point of the sprite, taking into account the actual positions of vertices. More...
 
void SetAnchor (ANCHOR_METHOD a)
 Sets the anchor method to use. See ANCHOR_METHOD More...
 
void SetOffset (Vector3 o)
 Sets the offset of the sprite from its GameObject. See offset More...
 
Vector2 PixelSpaceToUVSpace (Vector2 xy)
 Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()! More...
 
Vector2 PixelSpaceToUVSpace (int x, int y)
 Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()! More...
 
Vector2 PixelCoordToUVCoord (Vector2 xy)
 Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()! More...
 
Vector2 PixelCoordToUVCoord (int x, int y)
 Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()! More...
 
abstract int GetStateIndex (string stateName)
 Returns the index of the state with the specified name. -1 if no state matching the specified name is found. More...
 
abstract void SetState (int index)
 Sets the sprite to the specified state/animation. More...
 

Public Attributes

bool managed = false
 When true, the sprite will be managed by the selected sprite manager script. When false, the sprite has its own mesh and will be batched automatically with other sprites (when available - Unity iPhone). More...
 
SpriteManager manager
 Reference to the manager which will manage this sprite, provided managed is set to true. More...
 
int drawLayer
 The layer in which the sprite will be drawn if managed. More...
 
bool persistent = false
 This must be set to true at design time for the sprite to survive loading a new level. More...
 
SPRITE_PLANE plane = SPRITE_PLANE.XY
 The plane in which the sprite will be drawn. More...
 
WINDING_ORDER winding = WINDING_ORDER.CW
 The winding order of the sprite's polygons - determines the direction the sprite will "face". More...
 
float width
 Width of the sprite in world space. More...
 
float height
 Height of the sprite in world space. More...
 
Vector2 bleedCompensation
 Will contract the UV edges of the sprite by the specified amount to prevent "bleeding" from neighboring pixels, especially when mipmapping. More...
 
ANCHOR_METHOD anchor = ANCHOR_METHOD.TEXTURE_OFFSET
 Anchor method to use.

See Also
ANCHOR_METHOD
More...
 
bool pixelPerfect = false
 Automatically sizes the sprite so that it will display pixel-perfect on-screen. NOTE: If you change the orthographic size of the camera or the distance between the sprite and a perspective camera, call SetCamera() to make the text pixel-perfect again. However, if you want automatic resizing functionality without being pixel-perfect and therefore allowing zooming in and out, use autoResize instead. More...
 
bool autoResize = false
 Automatically resizes the sprite based on its new UV dimensions compared to its previous dimensions. Setting this to true allows you to use non-uniform sized sprites for animation without causing the sprite to appear "squashed" while animating. More...
 
Vector3 offset = new Vector3()
 Offsets the sprite, in world space, from the center of its GameObject. More...
 
Color color = Color.white
 The color to be used by all four of the sprite's vertices. This can be used to color, highlight, or fade the sprite. Be sure to use a vertex-colored shader for this to have an effect. More...
 
bool hideAtStart = false
 Whether the sprite will be hideAtStart when it starts. More...
 
bool ignoreClipping = false
 When true, the sprite will not be clipped. More...
 

Properties

Color Color [get, set]
 Accessor for the object's current overall color tint. More...
 
virtual Camera RenderCamera [get, set]
 Accessor for the camera that will be used to render this object. Use this to ensure the object is properly configured for the specific camera that will render it. More...
 
Vector2 PixelSize [get, set]
 Gets/Sets the width and height of the sprite in pixels as it appears on-screen. More...
 
Vector2 ImageSize [get]
 Gets the width and height of the image the sprite is displaying. NOTE: This is not the number of screen pixels occupied by the sprite, but rather the original number of texels which compose the sprite's image. More...
 
bool Managed [get, set]
 Sets the sprite to a managed or batched state. More...
 
virtual Rect3D ClippingRect [get, set]
 The rect against which the sprite should be clipped. The sprite will be immediately clipped by this rect when set. When setting, the rect should be in world space. More...
 
virtual bool Clipped [get, set]
 Accessor for whether the sprite is to be clipped by any already-specified clipping rect. More...
 
ANCHOR_METHOD Anchor [get, set]
 Accessor for the object's anchor method. More...
 
Vector3 UnclippedTopLeft [get]
 The top-left corner of the sprite when no clipping or trimming is applied. More...
 
Vector3 UnclippedBottomRight [get]
 The bottom-right corner of the sprite when no clipping or trimming is applied. More...
 
Vector3 TopLeft [get]
 Returns the position of the top-left vertex of the sprite after any clipping or trimming. More...
 
Vector3 BottomRight [get]
 Returns the position of the bottom-right vertex of the sprite after any clipping or trimming. More...
 

Detailed Description

The root class of all sprites. Does not assume any animation capabilities or atlas packing.

Definition at line 628 of file SpriteRoot.cs.

Member Enumeration Documentation

The anchoring scheme of a sprite. The anchor point is the point on the sprite that will remain stationary when the sprite's size changes. For a health bar that "grows" to the right while its left edge remains stationary, you would use UPPER_LEFT, MIDDLE_LEFT, or BOTTOM_LEFT.

For a health bar that "grows" upward while the bottom edge remains stationary, you would use BOTTOM_LEFT, BOTTOM_CENTER, or BOTTOM_RIGHT.

Definition at line 651 of file SpriteRoot.cs.

The plane in which a sprite should be drawn.

Definition at line 633 of file SpriteRoot.cs.

Defines which way the polygons of a sprite should be wound. The two options are clock-wise (CW) and counter clock-wise (CCW). These determine the direction the sprite will "face".

Definition at line 673 of file SpriteRoot.cs.

Member Function Documentation

void SpriteRoot.CalcPixelToUV ( )

Recalculates the pixel-to-UV ratio based on the current texture.

Definition at line 1775 of file SpriteRoot.cs.

void SpriteRoot.CalcSize ( )

Recalculates the width and height of the sprite based upon the change in its UV dimensions (autoResize) or on the current camera's disposition (pixelPerfect).

Definition at line 1350 of file SpriteRoot.cs.

virtual void SpriteRoot.Clear ( )
virtual

Resets important sprite values to defaults for reuse.

Reimplemented in SpriteBase, AutoSpriteBase, and ManualSprite.

Definition at line 1027 of file SpriteRoot.cs.

virtual void SpriteRoot.Copy ( SpriteRoot  s)
virtual

Copies all the vital attributes of another sprite.

Parameters
sSource sprite to be copied.

Reimplemented in SpriteBase, AutoSpriteBase, ManualSprite, and PackedSprite.

Definition at line 1038 of file SpriteRoot.cs.

virtual void SpriteRoot.Delete ( )
virtual

If non-managed, call Delete() before destroying this component or the GameObject to which it is attached. Memory leaks can ensue otherwise.

Reimplemented in SpriteBase.

Definition at line 1105 of file SpriteRoot.cs.

Vector3 SpriteRoot.GetCenterPoint ( )

Gets the center point of the sprite, taking into account the actual positions of vertices.

Returns
The center point of the sprite.

Definition at line 2207 of file SpriteRoot.cs.

abstract int SpriteRoot.GetStateIndex ( string  stateName)
pure virtual

Returns the index of the state with the specified name. -1 if no state matching the specified name is found.

Parameters
stateNameThe name of the state sought.
Returns
The zero-based index of the state, or -1 if no state is found by that name.

Implemented in AutoSpriteBase, and ManualSprite.

Rect SpriteRoot.GetUVs ( )

Returns the current UV coordinates of the sprite (before bleed compensation).

Returns
Rect containing the sprite's UV coordinates.

Definition at line 2183 of file SpriteRoot.cs.

Vector3 [] SpriteRoot.GetVertices ( )

Returns a reference to the sprite's vertices. NOTE: You can only directly modify the sprite's vertices if it is a non-managed sprite.

Returns
A reference to the sprite's vertices.

Definition at line 2194 of file SpriteRoot.cs.

virtual void SpriteRoot.Hide ( bool  tf)
virtual

Hides or displays the sprite by disabling/enabling the sprite's mesh renderer component, or if managed, sets the mesh size to 0.

Parameters
tfWhen true, the sprite is hideAtStart, when false, the sprite will be displayed.

Reimplemented in SpriteBase.

Definition at line 1930 of file SpriteRoot.cs.

bool SpriteRoot.IsHidden ( )

Returns whether the sprite is currently set to be hideAtStart (whether its mesh renderer component is enabled).

Returns
True when hideAtStart, false when set to be displayed.

Definition at line 1942 of file SpriteRoot.cs.

Vector2 SpriteRoot.PixelCoordToUVCoord ( Vector2  xy)

Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!

Parameters
xyThe coordinates to convert.
Returns
The coordinates converted to UV coordinates.

Definition at line 2457 of file SpriteRoot.cs.

Vector2 SpriteRoot.PixelCoordToUVCoord ( int  x,
int  y 
)

Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!

Parameters
xThe x-coordinate to convert.
yThe y-coordinate to convert.
Returns
The coordinates converted to UV coordinates.

Definition at line 2475 of file SpriteRoot.cs.

Vector2 SpriteRoot.PixelSpaceToUVSpace ( Vector2  xy)

Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!

Parameters
xyThe values to convert.
Returns
The values converted to UV space.

Definition at line 2425 of file SpriteRoot.cs.

Vector2 SpriteRoot.PixelSpaceToUVSpace ( int  x,
int  y 
)

Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!

Parameters
xThe X-value to convert.
yThe Y-value to convert.
Returns
The values converted to UV space.

Definition at line 2443 of file SpriteRoot.cs.

void SpriteRoot.SetAnchor ( ANCHOR_METHOD  a)

Sets the anchor method to use. See ANCHOR_METHOD

Parameters
aThe anchor method to use.

Definition at line 2287 of file SpriteRoot.cs.

void SpriteRoot.SetBleedCompensation ( float  x,
float  y 
)

Sets the bleed compensation to use (see bleedCompensation).

Definition at line 2059 of file SpriteRoot.cs.

void SpriteRoot.SetBleedCompensation ( Vector2  xy)

Sets the bleed compensation to use (see bleedCompensation).

Definition at line 2064 of file SpriteRoot.cs.

void SpriteRoot.SetCamera ( )

A no-argument version of SetCamera() that simply re-assigns the same camera to the object, forcing it to recalculate all camera-dependent calculations.

Definition at line 1857 of file SpriteRoot.cs.

virtual void SpriteRoot.SetCamera ( Camera  c)
virtual

Sets the camera to use when calculating a pixel-perfect sprite size.

Parameters
c

Definition at line 1869 of file SpriteRoot.cs.

virtual void SpriteRoot.SetColor ( Color  c)
virtual

Sets the sprite's color to the specified color.

Parameters
cColor to shade the sprite.

Definition at line 1723 of file SpriteRoot.cs.

void SpriteRoot.SetDrawLayer ( int  layer)

Sets the draw layer of the sprite (only applies to managed sprites).

Parameters
layerThe draw layer of the sprite. Lower values cause an earlier draw order, higher values, a later draw order.

Definition at line 2105 of file SpriteRoot.cs.

void SpriteRoot.SetFrameInfo ( SPRITE_FRAME  fInfo)

Sets the sprite's frame info, which includes UVs, offsets, etc.

Parameters
fInfoA SPRITE_FRAME structure containing the frame info.

Definition at line 2121 of file SpriteRoot.cs.

void SpriteRoot.SetMaterial ( Material  mat)

Changes the material to be used by the sprite. NOTE: This can only be used with non-managed sprites.

Parameters
matThe new material.

Definition at line 1813 of file SpriteRoot.cs.

void SpriteRoot.SetOffset ( Vector3  o)

Sets the offset of the sprite from its GameObject. See offset

Parameters
oThe offset to use.

Definition at line 2309 of file SpriteRoot.cs.

void SpriteRoot.SetPlane ( SPRITE_PLANE  p)

Sets the plane in which the sprite is to be drawn. See: SPRITE_PLANE

Parameters
pThe plane in which the sprite should be drawn.

Definition at line 2082 of file SpriteRoot.cs.

virtual void SpriteRoot.SetSize ( float  w,
float  h 
)
virtual

Sets the physical dimensions of the sprite in the plane selected

Parameters
widthWidth of the sprite in world space.
heightHeight of the sprite in world space.

Definition at line 1384 of file SpriteRoot.cs.

abstract void SpriteRoot.SetState ( int  index)
pure virtual

Sets the sprite to the specified state/animation.

Parameters
indexThe zero-based index of the desired state/animation.

Implemented in AutoSpriteBase, and ManualSprite.

void SpriteRoot.SetTexture ( Texture2D  tex)

Changes the texture to be used by the sprite's material. NOTE: This will cause the sprite not to batch with other sprites and can only be used with non-managed sprites.

Parameters
texThe new texture.

Definition at line 1795 of file SpriteRoot.cs.

void SpriteRoot.SetUVs ( Rect  uv)

Sets the sprite's UVs to the specified values.

Parameters
nextFrameA Rect containing the new UV coordinates.

Definition at line 2136 of file SpriteRoot.cs.

void SpriteRoot.SetUVsFromPixelCoords ( Rect  pxCoords)

Sets the sprite's UVs from pixel coordinates.

Parameters
pxCoordsA rect containing the pixel coordinates. When populating the Rect, use the following syntax: Rect.MinMaxRect(leftCoord, bottomCoord, rightCoord, topCoord) Where the coordinates are in pixel space. Like in any image editor, the coordinate space runs from 0 on the left to width-1 on the right, and 0 at the top, to height-1 at the bottom.

Definition at line 2161 of file SpriteRoot.cs.

void SpriteRoot.SetWindingOrder ( WINDING_ORDER  order)

Sets the winding order to use. See WINDING_ORDER.

Parameters
orderThe winding order to use.

Definition at line 2092 of file SpriteRoot.cs.

delegate void SpriteRoot.SpriteResizedDelegate ( float  newWidth,
float  newHeight,
SpriteRoot  sprite 
)

Defines a delegate that can be called upon resizing of the sprite. Use this if you want to adjust colliders, etc, when the sprites dimensions are resized.

virtual void SpriteRoot.TruncateBottom ( float  pct)
virtual

Truncates the bottom edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation

Parameters
pctThe percentage of the sprite to truncate (0-1)

Definition at line 1599 of file SpriteRoot.cs.

virtual void SpriteRoot.TruncateLeft ( float  pct)
virtual

Truncates the left edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation

Parameters
pctThe percentage of the sprite to truncate (0-1)

Definition at line 1555 of file SpriteRoot.cs.

virtual void SpriteRoot.TruncateRight ( float  pct)
virtual

Truncates the right edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation

Parameters
pctThe percentage of the sprite to truncate (0-1)

Definition at line 1533 of file SpriteRoot.cs.

virtual void SpriteRoot.TruncateTop ( float  pct)
virtual

Truncates the top edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation

Parameters
pctThe percentage of the sprite to truncate (0-1)

Definition at line 1577 of file SpriteRoot.cs.

virtual void SpriteRoot.Unclip ( )
virtual

Removes any clipping that is being applied to the sprite.

Definition at line 1636 of file SpriteRoot.cs.

virtual void SpriteRoot.Untruncate ( )
virtual

Removes any truncation.

Definition at line 1618 of file SpriteRoot.cs.

void SpriteRoot.UpdateCamera ( )

Updates any camera-dependent settings, such as the calculated pixel-perfect size. Use this with BroadcastMessage() to do bulk re-calculation of object sizes whenever your screensize/resolution changes at runtime.

Definition at line 1847 of file SpriteRoot.cs.

virtual void SpriteRoot.UpdateUVs ( )
virtual

Applies any changes to the UVs to the actual sprite mesh.

Definition at line 1654 of file SpriteRoot.cs.

Member Data Documentation

ANCHOR_METHOD SpriteRoot.anchor = ANCHOR_METHOD.TEXTURE_OFFSET

Anchor method to use.

See Also
ANCHOR_METHOD

Definition at line 749 of file SpriteRoot.cs.

bool SpriteRoot.autoResize = false

Automatically resizes the sprite based on its new UV dimensions compared to its previous dimensions. Setting this to true allows you to use non-uniform sized sprites for animation without causing the sprite to appear "squashed" while animating.

Definition at line 771 of file SpriteRoot.cs.

Vector2 SpriteRoot.bleedCompensation

Will contract the UV edges of the sprite by the specified amount to prevent "bleeding" from neighboring pixels, especially when mipmapping.

Definition at line 744 of file SpriteRoot.cs.

Color SpriteRoot.color = Color.white

The color to be used by all four of the sprite's vertices. This can be used to color, highlight, or fade the sprite. Be sure to use a vertex-colored shader for this to have an effect.

Definition at line 824 of file SpriteRoot.cs.

int SpriteRoot.drawLayer

The layer in which the sprite will be drawn if managed.

Definition at line 711 of file SpriteRoot.cs.

float SpriteRoot.height

Height of the sprite in world space.

Definition at line 737 of file SpriteRoot.cs.

bool SpriteRoot.hideAtStart = false

Whether the sprite will be hideAtStart when it starts.

Definition at line 856 of file SpriteRoot.cs.

bool SpriteRoot.ignoreClipping = false

When true, the sprite will not be clipped.

Definition at line 868 of file SpriteRoot.cs.

bool SpriteRoot.managed = false

When true, the sprite will be managed by the selected sprite manager script. When false, the sprite has its own mesh and will be batched automatically with other sprites (when available - Unity iPhone).

Definition at line 696 of file SpriteRoot.cs.

SpriteManager SpriteRoot.manager

Reference to the manager which will manage this sprite, provided managed is set to true.

Definition at line 702 of file SpriteRoot.cs.

Vector3 SpriteRoot.offset = new Vector3()

Offsets the sprite, in world space, from the center of its GameObject.

Definition at line 816 of file SpriteRoot.cs.

bool SpriteRoot.persistent = false

This must be set to true at design time for the sprite to survive loading a new level.

Definition at line 716 of file SpriteRoot.cs.

bool SpriteRoot.pixelPerfect = false

Automatically sizes the sprite so that it will display pixel-perfect on-screen. NOTE: If you change the orthographic size of the camera or the distance between the sprite and a perspective camera, call SetCamera() to make the text pixel-perfect again. However, if you want automatic resizing functionality without being pixel-perfect and therefore allowing zooming in and out, use autoResize instead.

Definition at line 762 of file SpriteRoot.cs.

SPRITE_PLANE SpriteRoot.plane = SPRITE_PLANE.XY

The plane in which the sprite will be drawn.

Definition at line 721 of file SpriteRoot.cs.

float SpriteRoot.width

Width of the sprite in world space.

Definition at line 732 of file SpriteRoot.cs.

WINDING_ORDER SpriteRoot.winding = WINDING_ORDER.CW

The winding order of the sprite's polygons - determines the direction the sprite will "face".

Definition at line 727 of file SpriteRoot.cs.

Property Documentation

ANCHOR_METHOD SpriteRoot.Anchor
getset

Accessor for the object's anchor method.

Definition at line 2298 of file SpriteRoot.cs.

Vector3 SpriteRoot.BottomRight
get

Returns the position of the bottom-right vertex of the sprite after any clipping or trimming.

Definition at line 2369 of file SpriteRoot.cs.

virtual bool SpriteRoot.Clipped
getset

Accessor for whether the sprite is to be clipped by any already-specified clipping rect.

Definition at line 2265 of file SpriteRoot.cs.

virtual Rect3D SpriteRoot.ClippingRect
getset

The rect against which the sprite should be clipped. The sprite will be immediately clipped by this rect when set. When setting, the rect should be in world space.

Definition at line 2233 of file SpriteRoot.cs.

Color SpriteRoot.Color
getset

Accessor for the object's current overall color tint.

Definition at line 1736 of file SpriteRoot.cs.

Vector2 SpriteRoot.ImageSize
get

Gets the width and height of the image the sprite is displaying. NOTE: This is not the number of screen pixels occupied by the sprite, but rather the original number of texels which compose the sprite's image.

Definition at line 1970 of file SpriteRoot.cs.

bool SpriteRoot.Managed
getset

Sets the sprite to a managed or batched state.

Definition at line 1979 of file SpriteRoot.cs.

Vector2 SpriteRoot.PixelSize
getset

Gets/Sets the width and height of the sprite in pixels as it appears on-screen.

Definition at line 1956 of file SpriteRoot.cs.

virtual Camera SpriteRoot.RenderCamera
getset

Accessor for the camera that will be used to render this object. Use this to ensure the object is properly configured for the specific camera that will render it.

Definition at line 1831 of file SpriteRoot.cs.

Vector3 SpriteRoot.TopLeft
get

Returns the position of the top-left vertex of the sprite after any clipping or trimming.

Definition at line 2354 of file SpriteRoot.cs.

Vector3 SpriteRoot.UnclippedBottomRight
get

The bottom-right corner of the sprite when no clipping or trimming is applied.

Definition at line 2337 of file SpriteRoot.cs.

Vector3 SpriteRoot.UnclippedTopLeft
get

The top-left corner of the sprite when no clipping or trimming is applied.

Definition at line 2320 of file SpriteRoot.cs.


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