C# Класс SadConsole.Consoles.AnimatedTextSurface

Наследование: TextSurface
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Frames List

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

Свойство Тип Описание
_addedTime double
_animatedTime float
_currentFrameIndex int
_font Font
_isPlaying bool
_timePerFrame float
state AnimationState

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

Метод Описание
AnimatedTextSurface ( string name, int width, int height ) : System

Creates a new animation with the specified name, width, and height.

AnimatedTextSurface ( string name, int width, int height, Font font ) : System

Creates a new animation with the specified name, width, and height.

CreateFrame ( ) : TextSurfaceBasic

Creates a new frame with the same dimensions as this entity and adds it to the Frames collection of the entity.

Load ( string file ) : AnimatedTextSurface

Loads an animated text surface from a file.

Restart ( ) : void

Restarts the animation from the first frame.

Save ( string file ) : void

Saves the animated text surface to a file.

Start ( ) : void

Starts animating the frames.

Stop ( ) : void

Stops animating.

ToString ( ) : string

Returns the name of the animation.

Update ( ) : void

Updates the animation frames based on the time passed since the last call to this method.

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

Метод Описание
ResetArea ( ) : void

Forces the area of this text surface to always be the full width and height.

UpdateFrameReferences ( ) : void

Updates the base TextSurface render references to the current frame.

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

Метод Описание
CalculateFrameDuration ( ) : void

Calculates the time needed per frame for rendering.

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

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

Creates a new animation with the specified name, width, and height.
public AnimatedTextSurface ( string name, int width, int height ) : System
name string The name of the animation.
width int The width of each frame this animation will have.
height int The height of each frame this animation will have.
Результат System

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

Creates a new animation with the specified name, width, and height.
public AnimatedTextSurface ( string name, int width, int height, Font font ) : System
name string The name of the animation.
width int The width of each frame this animation will have.
height int The height of each frame this animation will have.
font Font The font used with this animation.
Результат System

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

Creates a new frame with the same dimensions as this entity and adds it to the Frames collection of the entity.
public CreateFrame ( ) : TextSurfaceBasic
Результат TextSurfaceBasic

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

Loads an animated text surface from a file.
public static Load ( string file ) : AnimatedTextSurface
file string The source file.
Результат AnimatedTextSurface

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

Forces the area of this text surface to always be the full width and height.
protected ResetArea ( ) : void
Результат void

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

Restarts the animation from the first frame.
public Restart ( ) : void
Результат void

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

Saves the animated text surface to a file.
public Save ( string file ) : void
file string The destination file.
Результат void

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

Starts animating the frames.
public Start ( ) : void
Результат void

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

Stops animating.
public Stop ( ) : void
Результат void

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

Returns the name of the animation.
public ToString ( ) : string
Результат string

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

Updates the animation frames based on the time passed since the last call to this method.
public Update ( ) : void
Результат void

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

Updates the base TextSurface render references to the current frame.
protected UpdateFrameReferences ( ) : void
Результат void

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

Frames публичное свойство

All frames of the animation
public List Frames
Результат List

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

Time counter for the naimation
protected double _addedTime
Результат double

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

The length of the animation
protected float _animatedTime
Результат float

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

The current frame index being animated.
protected int _currentFrameIndex
Результат int

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

The font to use with all frames.
protected Font _font
Результат Font

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

Indicates the animation is currently animating.
protected bool _isPlaying
Результат bool

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

How much time per animated frame should be used.
protected float _timePerFrame
Результат float

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

The state of the animation.
protected AnimationState state
Результат AnimationState