C# 클래스 Nez.TextureAtlases.TexturePackerAtlas

파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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