C# Class Nez.TextureAtlases.TexturePackerAtlas

Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
spriteAnimationDetails List>.Dictionary
subtextures List
texture Microsoft.Xna.Framework.Graphics.Texture2D

Méthodes publiques

Méthode Description
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

Method Details

TexturePackerAtlas() public méthode

public TexturePackerAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System.Collections.Generic
texture Microsoft.Xna.Framework.Graphics.Texture2D
Résultat System.Collections.Generic

create() public static méthode

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
Résultat TexturePackerAtlas

createRegion() public méthode

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
Résultat Nez.Textures.Subtexture

getSpriteAnimation() public méthode

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.
Résultat SpriteAnimation

getSubtexture() public méthode

public getSubtexture ( int index ) : Subtexture
index int
Résultat Nez.Textures.Subtexture

getSubtexture() public méthode

public getSubtexture ( string name ) : Subtexture
name string
Résultat Nez.Textures.Subtexture

removeSubtexture() public méthode

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

removeSubtexture() public méthode

public removeSubtexture ( string name ) : void
name string
Résultat void

this() public méthode

public this ( int index ) : Subtexture
index int
Résultat Nez.Textures.Subtexture

this() public méthode

public this ( string name ) : Subtexture
name string
Résultat Nez.Textures.Subtexture

Property Details

spriteAnimationDetails public_oe property

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
Résultat List>.Dictionary

subtextures public_oe property

public List subtextures
Résultat List

texture public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics texture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D