C# Класс PunkX.Engine

Main game class, Manages the game loop.
Показать файл Открыть проект

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

Свойство Тип Описание
paused System.Boolean

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

Метод Описание
Engine ( int width, int height, int frameRate = 60, System.Boolean fixedFrameRate = false ) : System

Constructor. Defines startup information about your game.

init ( ) : void

override this method - called by Engine before main loop starts

render ( ) : void

Renders the game, rendering the World and Entities.

setStageProperties ( ) : void

Sets the game's stage properties. Override this to set them differently.

update ( ) : void

updates the game, updating the World and Entities

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

Метод Описание
checkWorld ( ) : void

Switch Worlds if they've changed.

onEnterFrame ( ) : void

Framerate independent game loop.

onStage ( ) : void

Event handler for stage entry.

onTimer ( ) : void

Fixed framerate game loop.

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

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

Constructor. Defines startup information about your game.
public Engine ( int width, int height, int frameRate = 60, System.Boolean fixedFrameRate = false ) : System
width int The width of your game.
height int The height of your game.
frameRate int The game framerate, in frames per second.
fixedFrameRate System.Boolean If a fixed-framerate should be used.
Результат System

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

override this method - called by Engine before main loop starts
public init ( ) : void
Результат void

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

Renders the game, rendering the World and Entities.
public render ( ) : void
Результат void

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

Sets the game's stage properties. Override this to set them differently.
public setStageProperties ( ) : void
Результат void

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

updates the game, updating the World and Entities
public update ( ) : void
Результат void

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

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

If the game should stop updating/rendering.
public Boolean,System paused
Результат System.Boolean