C# Класс SadConsole.Effects.EffectsManager

Effects manager for a text surface.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_effectCells CellEffectData>.Dictionary
_effects CellEffectData>.Dictionary
backingSurface ITextSurface

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

Метод Описание
EffectsManager ( ITextSurface surface ) : System

Creates a new effects manager associated with a text surface.

GetEffect ( Cell cell ) : Effects.ICellEffect

Gets the effect of the specified cell.

GetEffects ( ) : IEnumerable
Load ( string file, ITextSurfaceRendered backingSurface ) : EffectsManager

Loads effects from a file.

Remove ( ICellEffect effect ) : void

Removes an effect and associated cells from the manager.

RemoveAll ( ) : void

Removes all effects and associated cells.

Save ( string file ) : void

Saves the effects and the associated cell indexes from the backing surface.

SetEffect ( Cell cell, ICellEffect effect ) : void

Changes the effect of a specific cell.

SetEffect ( IEnumerable cells, ICellEffect effect ) : void

Changes the effect of the cells provided.

UpdateEffects ( double timeElapsed ) : void

Updates all known effects and applies them to their associated cells.

Защищенные методы

Метод Описание
ClearCellEffect ( Cell cell ) : void
GetKnownEffect ( ICellEffect effect, CellEffectData &effectData ) : bool

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

ClearCellEffect() защищенный Метод

protected ClearCellEffect ( Cell cell ) : void
cell Cell
Результат void

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

Creates a new effects manager associated with a text surface.
public EffectsManager ( ITextSurface surface ) : System
surface ITextSurface Text surface to manage.
Результат System

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

Gets the effect of the specified cell.
public GetEffect ( Cell cell ) : Effects.ICellEffect
cell Cell
Результат Effects.ICellEffect

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

public GetEffects ( ) : IEnumerable
Результат IEnumerable

GetKnownEffect() защищенный Метод

protected GetKnownEffect ( ICellEffect effect, CellEffectData &effectData ) : bool
effect ICellEffect
effectData CellEffectData
Результат bool

Load() публичный статический Метод

Loads effects from a file.
public static Load ( string file, ITextSurfaceRendered backingSurface ) : EffectsManager
file string The file to load from.
backingSurface ITextSurfaceRendered The surface the effects were originally (or will be) associated with.
Результат EffectsManager

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

Removes an effect and associated cells from the manager.
public Remove ( ICellEffect effect ) : void
effect ICellEffect Effect to remove.
Результат void

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

Removes all effects and associated cells.
public RemoveAll ( ) : void
Результат void

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

Saves the effects and the associated cell indexes from the backing surface.
public Save ( string file ) : void
file string The file to save the effects to.
Результат void

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

Changes the effect of a specific cell.
public SetEffect ( Cell cell, ICellEffect effect ) : void
cell Cell Cells to change the effect on.
effect ICellEffect The effect to associate with the cell.
Результат void

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

Changes the effect of the cells provided.
public SetEffect ( IEnumerable cells, ICellEffect effect ) : void
cells IEnumerable Cells to change the effect on.
effect ICellEffect The effect to associate with the cell.
Результат void

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

Updates all known effects and applies them to their associated cells.
public UpdateEffects ( double timeElapsed ) : void
timeElapsed double The time elapased since the last update.
Результат void

Описание свойств

_effectCells защищенное свойство

protected Dictionary _effectCells
Результат CellEffectData>.Dictionary

_effects защищенное свойство

protected Dictionary _effects
Результат CellEffectData>.Dictionary

backingSurface защищенное свойство

protected ITextSurface backingSurface
Результат ITextSurface