C# Class TiaraFramework.Component.Sprite

Inheritance: ASprite
Mostra file Open project: TiaraGames/TiaraFramework

Public Properties

Property Type Description
CurrentIndex int
DrawRect Microsoft.Xna.Framework.Rectangle
FrameSize Point
Loop LoopMode
OriginIndex int
PauseFrame Point
Texture Microsoft.Xna.Framework.Graphics.Texture2D
isAniStoped bool
isPositive bool
isStopAtLastFrame bool

Protected Properties

Property Type Description
loopedTimes int
mspf int
sheetSize Point
tslf int

Public Methods

Method Description
ChangeTexture ( Microsoft.Xna.Framework.Graphics.Texture2D ttNew, bool changeDrawRect ) : void

Can be only used on Single Frame Sprite.

Copy ( ) : Sprite
CopyBase ( ) : ASprite
FrameToIndex ( Point Frame ) : int
GetAbsPosition ( ) : Vector2
GetAbsRect ( ) : Rectangle
GetColliRect ( ) : Rectangle
GetDrawRect ( ) : Rectangle
GetRect ( ) : Rectangle
IndexToFrame ( int Index ) : Point
Initialize ( ) : void
OneFrameSprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float rotation, Color color, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
OneFrameSprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
OneFrameSprite ( Vector2 position, string texturePath, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
PlayAnime ( ) : void
PurelyCopy ( ) : Sprite
Rewind ( ) : void
SetFPS ( int FPS ) : void
Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Point sheetSize, Point frameSize, float depth, Microsoft.Xna.Framework.Game game ) : System
Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, int startIndex, int playFramesNum, Point sheetSize, Point frameSize, float depth, Microsoft.Xna.Framework.Game game ) : System
StopAnime ( ) : void
StopAnimeAt ( Point frame ) : void
StopAnimeAt ( int index ) : void
Update ( GameTime gameTime ) : void
resetFrame ( ) : void

Protected Methods

Method Description
Sprite ( Microsoft.Xna.Framework.Game game ) : System
Sprite ( Sprite sp ) : System
Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float rotation, Color color, float depth, Microsoft.Xna.Framework.Game game ) : System
Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, float depth, Microsoft.Xna.Framework.Game game ) : System
Sprite ( Vector2 position, string texturePath, float depth, Microsoft.Xna.Framework.Game game ) : System

Method Details

ChangeTexture() public method

Can be only used on Single Frame Sprite.
public ChangeTexture ( Microsoft.Xna.Framework.Graphics.Texture2D ttNew, bool changeDrawRect ) : void
ttNew Microsoft.Xna.Framework.Graphics.Texture2D The new texture
changeDrawRect bool
return void

Copy() public method

public Copy ( ) : Sprite
return Sprite

CopyBase() public method

public CopyBase ( ) : ASprite
return ASprite

FrameToIndex() public method

public FrameToIndex ( Point Frame ) : int
Frame Point
return int

GetAbsPosition() public method

public GetAbsPosition ( ) : Vector2
return Vector2

GetAbsRect() public method

public GetAbsRect ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

GetColliRect() public method

public GetColliRect ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

GetDrawRect() public method

public GetDrawRect ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

GetRect() public method

public GetRect ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

IndexToFrame() public method

public IndexToFrame ( int Index ) : Point
Index int
return Point

Initialize() public method

public Initialize ( ) : void
return void

OneFrameSprite() public static method

public static OneFrameSprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float rotation, Color color, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
origin Vector2
rotation float
color Color
depth float
game Microsoft.Xna.Framework.Game
return Sprite

OneFrameSprite() public static method

public static OneFrameSprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
depth float
game Microsoft.Xna.Framework.Game
return Sprite

OneFrameSprite() public static method

public static OneFrameSprite ( Vector2 position, string texturePath, float depth, Microsoft.Xna.Framework.Game game ) : Sprite
position Vector2
texturePath string
depth float
game Microsoft.Xna.Framework.Game
return Sprite

PlayAnime() public method

public PlayAnime ( ) : void
return void

PurelyCopy() public method

public PurelyCopy ( ) : Sprite
return Sprite

Rewind() public method

public Rewind ( ) : void
return void

SetFPS() public method

public SetFPS ( int FPS ) : void
FPS int
return void

Sprite() protected method

protected Sprite ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
return System

Sprite() protected method

protected Sprite ( Sprite sp ) : System
sp Sprite
return System

Sprite() public method

public Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Point sheetSize, Point frameSize, float depth, Microsoft.Xna.Framework.Game game ) : System
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
sheetSize Point
frameSize Point
depth float
game Microsoft.Xna.Framework.Game
return System

Sprite() protected method

protected Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float rotation, Color color, float depth, Microsoft.Xna.Framework.Game game ) : System
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
origin Vector2
rotation float
color Color
depth float
game Microsoft.Xna.Framework.Game
return System

Sprite() protected method

protected Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, float depth, Microsoft.Xna.Framework.Game game ) : System
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
depth float
game Microsoft.Xna.Framework.Game
return System

Sprite() public method

public Sprite ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, int startIndex, int playFramesNum, Point sheetSize, Point frameSize, float depth, Microsoft.Xna.Framework.Game game ) : System
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
startIndex int
playFramesNum int
sheetSize Point
frameSize Point
depth float
game Microsoft.Xna.Framework.Game
return System

Sprite() protected method

protected Sprite ( Vector2 position, string texturePath, float depth, Microsoft.Xna.Framework.Game game ) : System
position Vector2
texturePath string
depth float
game Microsoft.Xna.Framework.Game
return System

StopAnime() public method

public StopAnime ( ) : void
return void

StopAnimeAt() public method

public StopAnimeAt ( Point frame ) : void
frame Point
return void

StopAnimeAt() public method

public StopAnimeAt ( int index ) : void
index int
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

resetFrame() public method

public resetFrame ( ) : void
return void

Property Details

CurrentIndex public_oe property

public int CurrentIndex
return int

DrawRect public_oe property

public Rectangle,Microsoft.Xna.Framework DrawRect
return Microsoft.Xna.Framework.Rectangle

FrameSize public_oe property

public Point FrameSize
return Point

Loop public_oe property

public LoopMode,TiaraFramework.Component Loop
return LoopMode

OriginIndex public_oe property

public int OriginIndex
return int

PauseFrame public_oe property

public Point PauseFrame
return Point

Texture public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics Texture
return Microsoft.Xna.Framework.Graphics.Texture2D

isAniStoped public_oe property

public bool isAniStoped
return bool

isPositive public_oe property

public bool isPositive
return bool

isStopAtLastFrame public_oe property

public bool isStopAtLastFrame
return bool

loopedTimes protected_oe property

protected int loopedTimes
return int

mspf protected_oe property

protected int mspf
return int

sheetSize protected_oe property

protected Point sheetSize
return Point

tslf protected_oe property

protected int tslf
return int