C# Class SimpleSprite, marblemadness

Inheritance: MonoBehaviour
Afficher le fichier Open project: MtvnGames/marblemadness Class Usage Examples

Méthodes publiques

Свойство Type Description
lowerLeftPixel Vector2
pixelDimensions Vector2

Protected Properties

Свойство Type Description
nullCamera bool

Méthodes publiques

Méthode Description
Clear ( ) : void
Copy ( SpriteRoot, s ) : void

Copies all the attributes of another sprite.

Create ( string name, Vector3 pos ) : SimpleSprite,

Creates a GameObject and attaches this component type to it.

Create ( string name, Vector3 pos, Quaternion rotation ) : SimpleSprite,

Creates a GameObject and attaches this component type to it.

DoMirror ( ) : void
GetDefaultPixelSize ( PathFromGUIDDelegate guid2Path, AssetLoaderDelegate loader ) : Vector2
GetStateIndex ( string stateName ) : int
InitUVs ( ) : void
SetLowerLeftPixel ( Vector2 lowerLeft ) : void

Sets the lower-left pixel of the sprite. See lowerLeftPixel

SetLowerLeftPixel ( int x, int y ) : void

Sets the lower-left pixel of the sprite. See lowerLeftPixel

SetPixelDimensions ( Vector2 size ) : void

Sets the pixel dimensions of the sprite. See pixelDimensions

SetPixelDimensions ( int x, int y ) : void

Sets the pixel dimensions of the sprite. See pixelDimensions

SetState ( int index ) : void
Setup ( float w, float h, Vector2 lowerleftPixel, Vector2 pixeldimensions ) : void

Sets up the essential elements of a sprite.

Setup ( float w, float h, Vector2 lowerleftPixel, Vector2 pixeldimensions, Material material ) : void

Sets up the essential elements of a sprite.

Start ( ) : void

Méthodes protégées

Méthode Description
Awake ( ) : void
Init ( ) : void

Method Details

Awake() protected méthode

protected Awake ( ) : void
Résultat void

Clear() public méthode

public Clear ( ) : void
Résultat void

Copy() public méthode

Copies all the attributes of another sprite.
public Copy ( SpriteRoot, s ) : void
s SpriteRoot, A reference to the sprite to be copied.
Résultat void

Create() static public méthode

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : SimpleSprite,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
Résultat SimpleSprite,

Create() static public méthode

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : SimpleSprite,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
rotation Quaternion Rotation of the object.
Résultat SimpleSprite,

DoMirror() public méthode

public DoMirror ( ) : void
Résultat void

GetDefaultPixelSize() public méthode

public GetDefaultPixelSize ( PathFromGUIDDelegate guid2Path, AssetLoaderDelegate loader ) : Vector2
guid2Path PathFromGUIDDelegate
loader AssetLoaderDelegate
Résultat Vector2

GetStateIndex() public méthode

public GetStateIndex ( string stateName ) : int
stateName string
Résultat int

Init() protected méthode

protected Init ( ) : void
Résultat void

InitUVs() public méthode

public InitUVs ( ) : void
Résultat void

SetLowerLeftPixel() public méthode

Sets the lower-left pixel of the sprite. See lowerLeftPixel
public SetLowerLeftPixel ( Vector2 lowerLeft ) : void
lowerLeft Vector2 Pixel coordinate of the lower-left corner of the sprite.
Résultat void

SetLowerLeftPixel() public méthode

Sets the lower-left pixel of the sprite. See lowerLeftPixel
public SetLowerLeftPixel ( int x, int y ) : void
x int X pixel coordinate.
y int Y pixel coordinate.
Résultat void

SetPixelDimensions() public méthode

Sets the pixel dimensions of the sprite. See pixelDimensions
public SetPixelDimensions ( Vector2 size ) : void
size Vector2 Dimensions of the sprite in pixels.
Résultat void

SetPixelDimensions() public méthode

Sets the pixel dimensions of the sprite. See pixelDimensions
public SetPixelDimensions ( int x, int y ) : void
x int X size in pixels.
y int Y size in pixels.
Résultat void

SetState() public méthode

public SetState ( int index ) : void
index int
Résultat void

Setup() public méthode

Sets up the essential elements of a sprite.
public Setup ( float w, float h, Vector2 lowerleftPixel, Vector2 pixeldimensions ) : void
w float The width, in local space, of the sprite.
h float The height, in local space, of the sprite.
lowerleftPixel Vector2 The coordinate of the lower-left pixel of the desired sprite on the sprite atlas.
pixeldimensions Vector2 The X and Y dimensions, in pixels, of the sprite.
Résultat void

Setup() public méthode

Sets up the essential elements of a sprite.
public Setup ( float w, float h, Vector2 lowerleftPixel, Vector2 pixeldimensions, Material material ) : void
w float The width, in local space, of the sprite.
h float The height, in local space, of the sprite.
lowerleftPixel Vector2 The coordinate of the lower-left pixel of the desired sprite on the sprite atlas.
pixeldimensions Vector2 The X and Y dimensions, in pixels, of the sprite.
material Material The material to use for the sprite.
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Property Details

lowerLeftPixel public_oe property

Position of the lower-left pixel of the sprite when no animation has been played.
public Vector2 lowerLeftPixel
Résultat Vector2

nullCamera protected_oe property

protected bool nullCamera
Résultat bool

pixelDimensions public_oe property

Dimensions, in pixels, of the sprite when no animation has been played.
public Vector2 pixelDimensions
Résultat Vector2