C# Class Nez.TextureAtlases.TextureAtlas

runtime component of the TextureAtlasGenerator. Stores the main Texture2D and all relevant metadata
Datei anzeigen Open project: prime31/Nez

Public Properties

Property Type Description
regionNames string[]
subtextures Nez.Textures.Subtexture[]

Public Methods

Method Description
TextureAtlas ( string regionNames, Subtexture subtextures ) : Nez.Textures
TextureAtlas ( string regionNames, Subtexture subtextures, Point>.Dictionary spriteAnimationDetails, int animationFPS = 15 ) : Nez.Textures
containsSubtexture ( string name ) : bool

checks whether the subtexture is contained in this atlas.

getSpriteAnimation ( string animationName ) : SpriteAnimation

returns a SpriteAnimation given an animationName where the animationName is the folder that contains the images

getSubtexture ( string name ) : Subtexture

gets the Subtexture for the passed in image name

this ( string name ) : Subtexture

Method Details

TextureAtlas() public method

public TextureAtlas ( string regionNames, Subtexture subtextures ) : Nez.Textures
regionNames string
subtextures Nez.Textures.Subtexture
return Nez.Textures

TextureAtlas() public method

public TextureAtlas ( string regionNames, Subtexture subtextures, Point>.Dictionary spriteAnimationDetails, int animationFPS = 15 ) : Nez.Textures
regionNames string
subtextures Nez.Textures.Subtexture
spriteAnimationDetails Point>.Dictionary
animationFPS int
return Nez.Textures

containsSubtexture() public method

checks whether the subtexture is contained in this atlas.
public containsSubtexture ( string name ) : bool
name string the image name
return bool

getSpriteAnimation() public method

returns a SpriteAnimation given an animationName where the animationName is the folder that contains the images
public getSpriteAnimation ( string animationName ) : SpriteAnimation
animationName string Animation name.
return Nez.Sprites.SpriteAnimation

getSubtexture() public method

gets the Subtexture for the passed in image name
public getSubtexture ( string name ) : Subtexture
name string Name.
return Nez.Textures.Subtexture

this() public method

public this ( string name ) : Subtexture
name string
return Nez.Textures.Subtexture

Property Details

regionNames public_oe property

image names for the subtextures. maps directly to the subtextures array
public string[] regionNames
return string[]

subtextures public_oe property

array of all subtextures from the atlas
public Subtexture[],Nez.Textures subtextures
return Nez.Textures.Subtexture[]