C# Class PackedSprite, urban-survivors

This implements SpriteBase and adds animation functionality allowing the user to define their sprite animations using individual, non-uniform sprite textures which will then be compiled into a sprite atlas automatically.
Inheritance: AutoSpriteBase
Afficher le fichier Open project: exdev/urban-survivors Class Usage Examples

Méthodes publiques

Свойство Type Description
textureAnimations TextureAnim[],

Méthodes publiques

Méthode Description
AddAnimation ( UVAnimation, anim ) : void

Adds an animation to the sprite for its use.

Aggregate ( PathFromGUIDDelegate guid2Path, LoadAssetDelegate load, GUIDFromPathDelegate path2Guid ) : void

Collects all textures intended for packing, as well as sprite frames, together into a standard form for processing.

Copy ( SpriteRoot, s ) : void

Copies all the attributes of another sprite.

Create ( string name, Vector3 pos ) : PackedSprite,

Creates a GameObject and attaches this component type to it.

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

Creates a GameObject and attaches this component type to it.

GetDefaultPixelSize ( PathFromGUIDDelegate guid2Path, AssetLoaderDelegate loader ) : Vector2
InitUVs ( ) : void
Start ( ) : void

Méthodes protégées

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

Method Details

AddAnimation() public méthode

Adds an animation to the sprite for its use.
public AddAnimation ( UVAnimation, anim ) : void
anim UVAnimation, The animation to add
Résultat void

Aggregate() public méthode

Collects all textures intended for packing, as well as sprite frames, together into a standard form for processing.
public Aggregate ( PathFromGUIDDelegate guid2Path, LoadAssetDelegate load, GUIDFromPathDelegate path2Guid ) : void
guid2Path PathFromGUIDDelegate
load LoadAssetDelegate
path2Guid GUIDFromPathDelegate
Résultat void

Awake() protected méthode

protected Awake ( ) : 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 ) : PackedSprite,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
Résultat PackedSprite,

Create() static public méthode

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : PackedSprite,
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 PackedSprite,

GetDefaultPixelSize() public méthode

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

Init() protected méthode

protected Init ( ) : void
Résultat void

InitUVs() public méthode

public InitUVs ( ) : void
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Property Details

textureAnimations public_oe property

The animations as defined using individual textures. See TextureAnim
public TextureAnim[], textureAnimations
Résultat TextureAnim[],