varollo.asepriteimporter.mg.drawcounterbase - Varollo/aseprite-importer GitHub Wiki

< Back


DrawCounterBase

Namespace: Varollo.AsepriteImporter.MG

Counter used by a AsepriteAnimator.
Count changes during the method, while = true.

public abstract class DrawCounterBase : IAnimationCounter, Microsoft.Xna.Framework.IGameComponent, Microsoft.Xna.Framework.IDrawable

Inheritance ObjectDrawCounterBase
Implements IAnimationCounter, IGameComponent, IDrawable

Properties

DrawOrder

public int DrawOrder { get; }

Property Value

Int32

Visible

public bool Visible { get; private set; }

Property Value

Boolean

Constructors

DrawCounterBase(Game, Int32)

Initializes a DrawTimeCounter as a component of given instance.

public DrawCounterBase(Game game, int drawOrder)

Parameters

game Game
instance.

drawOrder Int32
[optional] Order to count passed time, among other components.

DrawCounterBase(GameComponentCollection, Int32)

Initializes a DrawTimeCounter and adds it to a

public DrawCounterBase(GameComponentCollection components, int drawOrder)

Parameters

components GameComponentCollection
to add counter instance.

drawOrder Int32
[optional] Order to count passed time, among other components.

Methods

GetCount()

public double GetCount()

Returns

Double

SetVisibility(Boolean)

Enables or disables the counter.

public void SetVisibility(bool visible)

Parameters

visible Boolean
Visibility state.

Initialize()

public void Initialize()

Draw(GameTime)

public void Draw(GameTime gameTime)

Parameters

gameTime GameTime

Count(GameTime)

Computes AsepriteAnimation frame count changes.

protected abstract double Count(GameTime gameTime)

Parameters

gameTime GameTime
Time information.

Returns

Double
Value to add(+) to animation counter.

Events

DrawOrderChanged

public event EventHandler<EventArgs> DrawOrderChanged;

VisibleChanged

public event EventHandler<EventArgs> VisibleChanged;

< Back

⚠️ **GitHub.com Fallback** ⚠️