C# Класс Nez.TextureAtlases.TexturePackerAtlas

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
spriteAnimationDetails List>.Dictionary
subtextures List
texture Microsoft.Xna.Framework.Graphics.Texture2D

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

Метод Описание
TexturePackerAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System.Collections.Generic
create ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int regionWidth, int regionHeight, int maxRegionCount = int.MaxValue, int margin, int spacing ) : TexturePackerAtlas
createRegion ( string name, int x, int y, int width, int height, float pivotX = 0.5f, float pivotY = 0.5f ) : Subtexture
getSpriteAnimation ( string animationName ) : SpriteAnimation

returns a SpriteAnimation given an animationName where the animationName is the region's "filename" metadata in the TexturePacker atlas minus the framenumbers at the end

getSubtexture ( int index ) : Subtexture
getSubtexture ( string name ) : Subtexture
removeSubtexture ( int index ) : void
removeSubtexture ( string name ) : void
this ( int index ) : Subtexture
this ( string name ) : Subtexture

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

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

public TexturePackerAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System.Collections.Generic
texture Microsoft.Xna.Framework.Graphics.Texture2D
Результат System.Collections.Generic

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

public static create ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int regionWidth, int regionHeight, int maxRegionCount = int.MaxValue, int margin, int spacing ) : TexturePackerAtlas
texture Microsoft.Xna.Framework.Graphics.Texture2D
regionWidth int
regionHeight int
maxRegionCount int
margin int
spacing int
Результат TexturePackerAtlas

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

public createRegion ( string name, int x, int y, int width, int height, float pivotX = 0.5f, float pivotY = 0.5f ) : Subtexture
name string
x int
y int
width int
height int
pivotX float
pivotY float
Результат Nez.Textures.Subtexture

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

returns a SpriteAnimation given an animationName where the animationName is the region's "filename" metadata in the TexturePacker atlas minus the framenumbers at the end
public getSpriteAnimation ( string animationName ) : SpriteAnimation
animationName string Animation name.
Результат SpriteAnimation

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

public getSubtexture ( int index ) : Subtexture
index int
Результат Nez.Textures.Subtexture

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

public getSubtexture ( string name ) : Subtexture
name string
Результат Nez.Textures.Subtexture

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

public removeSubtexture ( int index ) : void
index int
Результат void

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

public removeSubtexture ( string name ) : void
name string
Результат void

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

public this ( int index ) : Subtexture
index int
Результат Nez.Textures.Subtexture

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

public this ( string name ) : Subtexture
name string
Результат Nez.Textures.Subtexture

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

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

stores a map of the name of the sprite animation (derived from texturepacker filename metadata) to an array. each entry in the list refers to index of the corresponding subtexture
public Dictionary> spriteAnimationDetails
Результат List>.Dictionary

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

public List subtextures
Результат List

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

public Texture2D,Microsoft.Xna.Framework.Graphics texture
Результат Microsoft.Xna.Framework.Graphics.Texture2D