C# 클래스 MegaMan.Engine.Engine

This engine class controls the low level behaviors. Its main job is keeping a "heartbeat" at a constant framerate. Basically, it's the main loop for the game - logic, then draw, repeat. It also holds the device context that things will draw with, and has some basic drawing control functions.
파일 보기 프로젝트 열기: Tesserex/C--MegaMan-Engine 1 사용 예제들

공개 메소드들

메소드 설명
Begin ( ) : void
DelayedCall ( System.Action callback, Action progress, int delay ) : void

Calls a function after a given number of frames.

FadeTransition ( System.Action callback, System.Action finished = null ) : void

Fades the screen to black, calls an optional callback function, and then fades back in, and calls another callback function when done.

GetLayerVisibility ( int layer ) : bool
Pause ( ) : void
SetLayerVisibility ( int layer, bool visibility ) : void
Start ( ) : void
Stop ( ) : void
UnloadAudio ( ) : void

Disposes of all audio objects. If you try to play audio after this is called, you will get an error.

Unpause ( ) : void

비공개 메소드들

메소드 설명
Application_Idle ( ) : void
CheckInput ( ) : void
Engine ( ) : System
KeyToInput ( Keys key ) : GameInput
RenderContext ( int layer ) : void
Step ( float dt ) : bool
opacityDown ( System.Action callback ) : void
opacityUp ( ) : void

메소드 상세

Begin() 공개 메소드

public Begin ( ) : void
리턴 void

DelayedCall() 공개 메소드

Calls a function after a given number of frames.
public DelayedCall ( System.Action callback, Action progress, int delay ) : void
callback System.Action The callback function to call.
progress Action A function called each frame to report the progress of the delay.
delay int The number of frames to wait before calling.
리턴 void

FadeTransition() 공개 메소드

Fades the screen to black, calls an optional callback function, and then fades back in, and calls another callback function when done.
public FadeTransition ( System.Action callback, System.Action finished = null ) : void
callback System.Action The function to call when the screen is black. Can be null.
finished System.Action The function to call when the transition is finished. Can be null.
리턴 void

GetLayerVisibility() 공개 메소드

public GetLayerVisibility ( int layer ) : bool
layer int
리턴 bool

Pause() 공개 메소드

public Pause ( ) : void
리턴 void

SetLayerVisibility() 공개 메소드

public SetLayerVisibility ( int layer, bool visibility ) : void
layer int
visibility bool
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void

UnloadAudio() 공개 메소드

Disposes of all audio objects. If you try to play audio after this is called, you will get an error.
public UnloadAudio ( ) : void
리턴 void

Unpause() 공개 메소드

public Unpause ( ) : void
리턴 void