C# Класс WarTornLands.Infrastructure.Systems.DrawSystem.DrawManager

Показать файл Открыть проект

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

Метод Описание
Bake ( IDrawProvider drawProvider ) : void

Bakes the specified IDrawProvider by calling its Draw(GameTime).

Bake ( RenderTarget2D drawProvider ) : void

Bakes the specified RenderTarget2D.

Bake ( Microsoft.Xna.Framework.Graphics.Texture2D drawProvider ) : void
BakeBeginEffect ( BaseEffect effect ) : void
BakeBeginEffect ( Effect effect ) : void

Starts the excecution of a Effect.\n Note that SpriteSortMode MUST be 'Immediate'.

BakeEndEffect ( ) : void

Removes an applied effect from the bake process.

BakeFill ( Color c ) : void

Fills the whole current RenderTarget2D with one color.

BeginBake ( GameTime gameTime, RenderTarget2D plate, SpriteSortMode customSortMode = SpriteSortMode.Deferred, BlendState customBlendState = null ) : void

Starts the bake process and uses a predefined RenderTarget2D.

BeginBake ( GameTime gameTime, SpriteSortMode customSortMode = SpriteSortMode.Deferred, BlendState customBlendState = null ) : void

Starts the bake process and prepares a fresh RenderTarget2D.

Draw ( RenderTarget2D source, GameTime gameTime ) : void

Draws the specified RenderTarget2D.

DrawManager ( ) : WarTornLands.DEBUG

Manager who handles all the drawing and effect applying.

EndBake ( ) : RenderTarget2D

Ends the baking process and return the well done RenderTarget2D.

FireAndForget ( BaseEffect effect ) : void
Update ( GameTime gameTime ) : void

Приватные методы

Метод Описание
createRT ( ) : RenderTarget2D

Creates a new RenderTarget2D.

Описание методов

Bake() публичный Метод

Bakes the specified IDrawProvider by calling its Draw(GameTime).
BeginBake must be called before Bake
public Bake ( IDrawProvider drawProvider ) : void
drawProvider IDrawProvider The draw provider implementing Draw(GameTime).
Результат void

Bake() публичный Метод

Bakes the specified RenderTarget2D.
BeginBake must be called before Bake
public Bake ( RenderTarget2D drawProvider ) : void
drawProvider Microsoft.Xna.Framework.Graphics.RenderTarget2D The RenderTarget to draw.
Результат void

Bake() публичный Метод

public Bake ( Microsoft.Xna.Framework.Graphics.Texture2D drawProvider ) : void
drawProvider Microsoft.Xna.Framework.Graphics.Texture2D
Результат void

BakeBeginEffect() публичный Метод

public BakeBeginEffect ( BaseEffect effect ) : void
effect BaseEffect
Результат void

BakeBeginEffect() публичный Метод

Starts the excecution of a Effect.\n Note that SpriteSortMode MUST be 'Immediate'.
BeginBake must be called before BakeBeginEffect When using Effect stick to SpriteSortMode.Immediate.\nEffects won´t affect Sprite when deferred drawing is used
public BakeBeginEffect ( Effect effect ) : void
effect Microsoft.Xna.Framework.Graphics.Effect Effect to be startet
Результат void

BakeEndEffect() публичный Метод

Removes an applied effect from the bake process.
BeginBake must be called before BakeBeginEffect
public BakeEndEffect ( ) : void
Результат void

BakeFill() публичный Метод

Fills the whole current RenderTarget2D with one color.
public BakeFill ( Color c ) : void
c Color Color to apply on the whole RenderTarget2D
Результат void

BeginBake() публичный Метод

Starts the bake process and uses a predefined RenderTarget2D.
public BeginBake ( GameTime gameTime, RenderTarget2D plate, SpriteSortMode customSortMode = SpriteSortMode.Deferred, BlendState customBlendState = null ) : void
gameTime Microsoft.Xna.Framework.GameTime Time since last update
plate Microsoft.Xna.Framework.Graphics.RenderTarget2D The RenderTarget2D which is used to bake on
customSortMode SpriteSortMode If needed specify SpriteSortMode for this bake process
customBlendState Microsoft.Xna.Framework.Graphics.BlendState If needed specify BlendState for this bake process
Результат void

BeginBake() публичный Метод

Starts the bake process and prepares a fresh RenderTarget2D.
public BeginBake ( GameTime gameTime, SpriteSortMode customSortMode = SpriteSortMode.Deferred, BlendState customBlendState = null ) : void
gameTime Microsoft.Xna.Framework.GameTime Time since last update
customSortMode SpriteSortMode If needed specify SpriteSortMode for this bake process
customBlendState Microsoft.Xna.Framework.Graphics.BlendState If needed specify BlendState for this bake process
Результат void

Draw() публичный Метод

Draws the specified RenderTarget2D.
public Draw ( RenderTarget2D source, GameTime gameTime ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The RenderTarget2D to put on the screen.
gameTime Microsoft.Xna.Framework.GameTime The game time since last Update.
Результат void

DrawManager() публичный Метод

Manager who handles all the drawing and effect applying.
public DrawManager ( ) : WarTornLands.DEBUG
Результат WarTornLands.DEBUG

EndBake() публичный Метод

Ends the baking process and return the well done RenderTarget2D.
BeginBake must be called before EndBake
public EndBake ( ) : RenderTarget2D
Результат Microsoft.Xna.Framework.Graphics.RenderTarget2D

FireAndForget() публичный Метод

public FireAndForget ( BaseEffect effect ) : void
effect BaseEffect
Результат void

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void