C# 클래스 Terrarium.Renderer.DirectX.DirectDrawSpriteSurface

Encapsulate the logic for implementing a sprite surface capable of rendering animated sprites.
파일 보기 프로젝트 열기: eugeniomiro/Terrarium 1 사용 예제들

공개 메소드들

메소드 설명
DirectDrawSpriteSurface ( string spriteName, string spriteImagePath, int xFrames, int yFrames ) : System

Creates a new sprite sheet with the given name from an image. The sheet is broken into sprites given the number of horizontal and vertical frames available on this sheet.

GrabSprite ( int xFrame, int yFrame, Rectangle dest, Rectangle bounds ) : DirectDrawClippedRect

Retreive a sprite that has to be drawn within the given destination rectangle, given the bounds of the viewport.

GrabSprite ( int xFrame, int yFrame, Rectangle dest, Rectangle bounds, int factor ) : DirectDrawClippedRect

Retreive a sprite that has to be drawn within the given destination rectangle, given the bounds of the viewport. Also contains a scaling factor.

GrabSprite ( int xFrame, int yFrame ) : RECT

Grab a sprite given the x,y frame offset

메소드 상세

DirectDrawSpriteSurface() 공개 메소드

Creates a new sprite sheet with the given name from an image. The sheet is broken into sprites given the number of horizontal and vertical frames available on this sheet.
public DirectDrawSpriteSurface ( string spriteName, string spriteImagePath, int xFrames, int yFrames ) : System
spriteName string The name of the sprite sheet
spriteImagePath string The path to the image to load.
xFrames int The number of horizontal frames on this sheet.
yFrames int The number of vertical frames on this sheet.
리턴 System

GrabSprite() 공개 메소드

Retreive a sprite that has to be drawn within the given destination rectangle, given the bounds of the viewport.
public GrabSprite ( int xFrame, int yFrame, Rectangle dest, Rectangle bounds ) : DirectDrawClippedRect
xFrame int Retrieve the Xth horizontal frame.
yFrame int Retrieve the Yth vertical frame.
dest System.Drawing.Rectangle The destination rectangle for the sprite.
bounds System.Drawing.Rectangle The view rectangle bounds.
리턴 DirectDrawClippedRect

GrabSprite() 공개 메소드

Retreive a sprite that has to be drawn within the given destination rectangle, given the bounds of the viewport. Also contains a scaling factor.
public GrabSprite ( int xFrame, int yFrame, Rectangle dest, Rectangle bounds, int factor ) : DirectDrawClippedRect
xFrame int Retrieve the Xth horizontal frame.
yFrame int Retrieve the Yth vertical frame.
dest System.Drawing.Rectangle The destination rectangle for the sprite.
bounds System.Drawing.Rectangle The view rectangle bounds.
factor int A scaling factor.
리턴 DirectDrawClippedRect

GrabSprite() 공개 메소드

Grab a sprite given the x,y frame offset
public GrabSprite ( int xFrame, int yFrame ) : RECT
xFrame int Retrieve the Xth horizontal frame.
yFrame int Retrieve the Yth vertical frame.
리턴 RECT