C# 클래스 PunkX.Engine

Main game class, Manages the game loop.
파일 보기 프로젝트 열기: RichardMarks/PunkX

공개 프로퍼티들

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