C# Класс ScreenManagement.ScreenManager

Наследование: Microsoft.Xna.Framework.DrawableGameComponent
Показать файл Открыть проект

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

Метод Описание
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