C# Класс Tilengine.Engine

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Animations Tilengine.Animation[]
Layers Tilengine.Layer[]
Sprites Tilengine.Sprite[]

Открытые методы

Метод Описание
BeginFrame ( int frame ) : void

Starts active rendering of the current frame

This method is used for active rendering combined with DrawNextScanline(), instead of using delegates for raster effects

Deinit ( ) : void

Deinits engine and frees associated resources

DrawNextScanline ( ) : bool

Draws the next scanline of the frame when doing active rendering (without delegates)

GetAvailableSprite ( ) : Sprite

Init ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : Engine

Initializes the graphic engine

This is a singleton object: calling Init multiple times will return the same reference

SetRenderTarget ( byte data, int pitch ) : void

Sets the output surface for rendering

The render target pixel format must be 32 bits RGBA

Приватные методы

Метод Описание
Engine ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : System
TLN_BeginFrame ( int frame ) : void
TLN_Deinit ( ) : void
TLN_DrawNextScanline ( ) : bool
TLN_GetAvailableSprite ( ) : int
TLN_GetHeight ( ) : int
TLN_GetLastError ( ) : Error
TLN_GetNumLayers ( ) : int
TLN_GetNumObjects ( ) : uint
TLN_GetNumSprites ( ) : int
TLN_GetUsedMemory ( ) : uint
TLN_GetVersion ( ) : uint
TLN_GetWidth ( ) : int
TLN_Init ( int hres, int vres, int numlayers, int numsprites, int numanimations ) : bool
TLN_InitBPP ( int hres, int vres, int bpp, int numlayers, int numsprites, int numanimations ) : bool
TLN_SetBGBitmap ( IntPtr bitmap ) : bool
TLN_SetBGColor ( int r, int g, int b ) : void
TLN_SetBGPalette ( IntPtr palette ) : bool
TLN_SetLastError ( Error error ) : void
TLN_SetRasterCallback ( RasterCallback callback ) : void
TLN_SetRenderTarget ( byte data, int pitch ) : void
TLN_UpdateFrame ( int time ) : void

Описание методов

BeginFrame() публичный Метод

Starts active rendering of the current frame
This method is used for active rendering combined with DrawNextScanline(), instead of using delegates for raster effects
public BeginFrame ( int frame ) : void
frame int Timestamp value
Результат void

Deinit() публичный Метод

Deinits engine and frees associated resources
public Deinit ( ) : void
Результат void

DrawNextScanline() публичный Метод

Draws the next scanline of the frame when doing active rendering (without delegates)
public DrawNextScanline ( ) : bool
Результат bool

GetAvailableSprite() публичный Метод

public GetAvailableSprite ( ) : Sprite
Результат Sprite

Init() публичный статический Метод

Initializes the graphic engine
This is a singleton object: calling Init multiple times will return the same reference
public static Init ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : Engine
hres int horizontal resolution in pixels
vres int vertical resolution in pixels
numLayers int number of layers
numSprites int number of sprites
numAnimations int number of animations
Результат Engine

SetRenderTarget() публичный Метод

Sets the output surface for rendering
The render target pixel format must be 32 bits RGBA
public SetRenderTarget ( byte data, int pitch ) : void
data byte Array of bytes that will hold the render target
pitch int Number of bytes per each scanline of the framebuffer
Результат void

Описание свойств

Animations публичное свойство

public Animation[],Tilengine Animations
Результат Tilengine.Animation[]

Layers публичное свойство

public Layer[],Tilengine Layers
Результат Tilengine.Layer[]

Sprites публичное свойство

public Sprite[],Tilengine Sprites
Результат Tilengine.Sprite[]