C# 클래스 ScreenManagement.ScreenManager

상속: Microsoft.Xna.Framework.DrawableGameComponent
파일 보기 프로젝트 열기: giladgray/XNA-ScreenManager

공개 메소드들

메소드 설명
AddScreen ( GameScreen GameScreen, PlayerIndex controllingPlayer ) : void

Adds a new GameScreen to the GameScreen manager.

Draw ( GameTime gameTime ) : void

Tells each GameScreen to draw itself.

FadeBackBufferToColor ( Color color, int alpha ) : void

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

GetScreen ( int index ) : GameScreen

Get a screen by index.

GetScreens ( ) : ScreenManagement.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 GameScreen manager component.

RemoveAllScreens ( ) : void

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

RemoveScreen ( GameScreen GameScreen ) : void

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

ScreenManager ( Game game ) : System

Constructs a new GameScreen manager component.

Update ( GameTime gameTime ) : void

Allows each GameScreen to run logic.

보호된 메소드들

메소드 설명
LoadContent ( ) : void

Load your graphics content.

UnloadContent ( ) : void

Unload your graphics content.

비공개 메소드들

메소드 설명
TraceScreens ( ) : void

Prints a list of all the screens, for debugging.

메소드 상세

AddScreen() 공개 메소드

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

Draw() 공개 메소드

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

FadeBackBufferToColor() 공개 메소드

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

GetScreen() 공개 메소드

Get a screen by index.
public GetScreen ( int index ) : GameScreen
index int
리턴 GameScreen

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 ( ) : ScreenManagement.GameScreen[]
리턴 ScreenManagement.GameScreen[]

Initialize() 공개 메소드

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

LoadContent() 보호된 메소드

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

RemoveAllScreens() 공개 메소드

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

RemoveScreen() 공개 메소드

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

ScreenManager() 공개 메소드

Constructs a new GameScreen manager component.
public ScreenManager ( Game game ) : System
game Game
리턴 System

UnloadContent() 보호된 메소드

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

Update() 공개 메소드

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