C# Класс 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.
Наследование: AutoSpriteBase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
textureAnimations TextureAnim[],

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Awake ( ) : void
Init ( ) : void

Описание методов

AddAnimation() публичный Метод

Adds an animation to the sprite for its use.
public AddAnimation ( UVAnimation, anim ) : void
anim UVAnimation, The animation to add
Результат void

Aggregate() публичный Метод

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
Результат void

Awake() защищенный Метод

protected Awake ( ) : void
Результат void

Copy() публичный Метод

Copies all the attributes of another sprite.
public Copy ( SpriteRoot, s ) : void
s SpriteRoot, A reference to the sprite to be copied.
Результат void

Create() статический публичный Метод

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.
Результат PackedSprite,

Create() статический публичный Метод

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.
Результат PackedSprite,

GetDefaultPixelSize() публичный Метод

public GetDefaultPixelSize ( PathFromGUIDDelegate guid2Path, AssetLoaderDelegate loader ) : Vector2
guid2Path PathFromGUIDDelegate
loader AssetLoaderDelegate
Результат Vector2

Init() защищенный Метод

protected Init ( ) : void
Результат void

InitUVs() публичный Метод

public InitUVs ( ) : void
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Описание свойств

textureAnimations публичное свойство

The animations as defined using individual textures. See TextureAnim
public TextureAnim[], textureAnimations
Результат TextureAnim[],