C# Class SadConsole.Engine

Afficher le fichier Open project: Thraka/SadConsole Class Usage Examples

Méthodes publiques

Свойство Type Description
ClearFrameColor Color
ConsoleRenderStack SadConsole.Consoles.ConsoleList
MonoGameInstance SadConsoleGame
Random System.Random
UnlimitedFPS bool

Méthodes publiques

Méthode Description
Draw ( GameTime gameTime ) : void
Initialize ( GraphicsDevice device, string font, int consoleWidth, int consoleHeight ) : Console

Initializes SadConsole with only a GraphicsDevice.

Initialize ( GraphicsDeviceManager deviceManager, string font, int consoleWidth, int consoleHeight ) : Console

Prepares the engine for use. This must be the first method you call on the engine when you provide your own GraphicsDeviceManager.

Initialize ( string font, int consoleWidth, int consoleHeight, Action ctorCallback = null ) : void

Prepares the engine for use. This must be the first method you call on the engine, then call Run to start SadConsole.

ResetRendering ( ) : void

Resets the render target and render rect to the size of the WindowWidth and WindowHeight.

RestoreRenderTarget ( ) : void

Only call this if you steal away the render target during the render process.

Run ( ) : void
ToggleFullScreen ( ) : void

Toggles between fullscreen. This safely restores the original window size.

Update ( GameTime gameTime, bool windowIsActive ) : void

Private Methods

Méthode Description
InitializeCompleted ( ) : void

Method Details

Draw() public static méthode

public static Draw ( GameTime gameTime ) : void
gameTime GameTime
Résultat void

Initialize() public static méthode

Initializes SadConsole with only a GraphicsDevice.
public static Initialize ( GraphicsDevice device, string font, int consoleWidth, int consoleHeight ) : Console
device GraphicsDevice
font string The font to load as the .
consoleWidth int The width of the default root console (and game window).
consoleHeight int The height of the default root console (and game window).
Résultat SadConsole.Consoles.Console

Initialize() public static méthode

Prepares the engine for use. This must be the first method you call on the engine when you provide your own GraphicsDeviceManager.
public static Initialize ( GraphicsDeviceManager deviceManager, string font, int consoleWidth, int consoleHeight ) : Console
deviceManager GraphicsDeviceManager The graphics device manager from MonoGame.
font string The font to load as the .
consoleWidth int The width of the default root console (and game window).
consoleHeight int The height of the default root console (and game window).
Résultat SadConsole.Consoles.Console

Initialize() public static méthode

Prepares the engine for use. This must be the first method you call on the engine, then call Run to start SadConsole.
public static Initialize ( string font, int consoleWidth, int consoleHeight, Action ctorCallback = null ) : void
font string The font to load as the .
consoleWidth int The width of the default root console (and game window).
consoleHeight int The height of the default root console (and game window).
ctorCallback Action Optional callback from the MonoGame Game class constructor.
Résultat void

ResetRendering() public static méthode

Resets the render target and render rect to the size of the WindowWidth and WindowHeight.
public static ResetRendering ( ) : void
Résultat void

RestoreRenderTarget() public static méthode

Only call this if you steal away the render target during the render process.
public static RestoreRenderTarget ( ) : void
Résultat void

Run() public static méthode

public static Run ( ) : void
Résultat void

ToggleFullScreen() public static méthode

Toggles between fullscreen. This safely restores the original window size.
public static ToggleFullScreen ( ) : void
Résultat void

Update() public static méthode

public static Update ( GameTime gameTime, bool windowIsActive ) : void
gameTime GameTime
windowIsActive bool
Résultat void

Property Details

ClearFrameColor public_oe static_oe property

Clears the screen this color each frame.
public static Color ClearFrameColor
Résultat Color

ConsoleRenderStack public_oe static_oe property

A list of consoles that will be rendered.
public static ConsoleList,SadConsole.Consoles ConsoleRenderStack
Résultat SadConsole.Consoles.ConsoleList

MonoGameInstance public_oe static_oe property

A game instance for SadConsole used when calling Initialize(string, int, int).
public static SadConsoleGame,SadConsole MonoGameInstance
Résultat SadConsoleGame

Random public_oe static_oe property

Centralized sudo random number generator used by SadConsole. Replace it with your own seed to replicate specific randomness.
public static Random,System Random
Résultat System.Random

UnlimitedFPS public_oe static_oe property

When true, does not lock at 60fps. Must be set before Initialize(string, int, int) is called.
public static bool UnlimitedFPS
Résultat bool