C# 클래스 GameStateManagement.ScreenManager

The screen manager is a component which manages one or more GameScreen instances. It maintains a stack of screens, calls their Update and Draw methods at the appropriate times, and automatically routes input to the topmost active screen.
파일 보기 프로젝트 열기: GarethIW/LDEngine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Game LDEngine.Game
Input InputState
ScaledMousePos Point
blankTexture Texture2D

공개 메소드들

메소드 설명
AddScreen ( GameScreen screen ) : void

Adds a new screen to the screen manager.

Draw ( GameTime gameTime ) : void

Tells each screen to draw itself.

FadeBackBufferToBlack ( float alpha ) : void

Helper draws a translucent black fullscreen sprite, used for fading screens in and out, and for darkening the background behind popups.

GetScreens ( ) : GameStateManagement.GameScreen[]

Expose an array holding all the screens. We return a copy rather than the real master list, because screens should only ever be added or removed using the AddScreen and RemoveScreen methods.

Initialize ( ) : void

Initializes the screen manager component.

LoadContent ( ) : void

Load your graphics content.

RemoveScreen ( GameScreen screen ) : void

Removes a screen from the screen manager. You should normally use GameScreen.ExitScreen instead of calling this directly, so the screen can gradually transition off rather than just being instantly removed.

ScreenManager ( LDEngine game ) : System

Constructs a new screen manager component.

TraceScreens ( ) : void

Prints a list of all the screens, for debugging.

UnloadContent ( ) : void

Unload your graphics content.

Update ( GameTime gameTime ) : void

Allows each screen to run logic.

비공개 메소드들

메소드 설명
CloseAllScreens ( ) : void
CloseScreen ( Type type ) : void

메소드 상세

AddScreen() 공개 메소드

Adds a new screen to the screen manager.
public AddScreen ( GameScreen screen ) : void
screen GameScreen
리턴 void

Draw() 공개 메소드

Tells each screen to draw itself.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

FadeBackBufferToBlack() 공개 메소드

Helper draws a translucent black fullscreen sprite, used for fading screens in and out, and for darkening the background behind popups.
public FadeBackBufferToBlack ( float alpha ) : void
alpha float
리턴 void

GetScreens() 공개 메소드

Expose an array holding all the screens. We return a copy rather than the real master list, because screens should only ever be added or removed using the AddScreen and RemoveScreen methods.
public GetScreens ( ) : GameStateManagement.GameScreen[]
리턴 GameStateManagement.GameScreen[]

Initialize() 공개 메소드

Initializes the screen manager component.
public Initialize ( ) : void
리턴 void

LoadContent() 공개 메소드

Load your graphics content.
public LoadContent ( ) : void
리턴 void

RemoveScreen() 공개 메소드

Removes a screen from the screen manager. You should normally use GameScreen.ExitScreen instead of calling this directly, so the screen can gradually transition off rather than just being instantly removed.
public RemoveScreen ( GameScreen screen ) : void
screen GameScreen
리턴 void

ScreenManager() 공개 메소드

Constructs a new screen manager component.
public ScreenManager ( LDEngine game ) : System
game LDEngine
리턴 System

TraceScreens() 공개 메소드

Prints a list of all the screens, for debugging.
public TraceScreens ( ) : void
리턴 void

UnloadContent() 공개 메소드

Unload your graphics content.
public UnloadContent ( ) : void
리턴 void

Update() 공개 메소드

Allows each screen to run logic.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

프로퍼티 상세

Game 공개적으로 프로퍼티

public LDEngine.Game Game
리턴 LDEngine.Game

Input 공개적으로 프로퍼티

public InputState,GameStateManagement Input
리턴 InputState

ScaledMousePos 공개적으로 프로퍼티

public Point ScaledMousePos
리턴 Point

blankTexture 공개적으로 프로퍼티

public Texture2D blankTexture
리턴 Texture2D