C# Class FontEffectsLib.FontTypes.SlidingFont

Inheritance: ShadowFont, IStateful
显示文件 Open project: GreatMindsRobotics/FontEffectsLib

Protected Properties

Property Type Description
_distanceToTarget float
_slideSpeed float
_startingPosition Vector2
_state FontState
_targetPosition Vector2
_targetTolerance float
_unitVectorToTarget Vector2

Public Methods

Method Description
Reset ( ) : void

Reset the font to its initial state.

Reset ( bool startSlide ) : void

Reset the font to its initial state.

Slide ( ) : void

Sets the font to visible and begins sliding towards the target position.

SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, Color tintColor ) : System
SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, String text, Color tintColor ) : System
SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, String text, Color tintColor, Vector2 shadowPosition, Color shadowColor ) : System
Update ( GameTime gameTime ) : void

Protected Methods

Method Description
calculateSlide ( ) : void
changeState ( FontState newState ) : void

Method Details

Reset() public method

Reset the font to its initial state.
public Reset ( ) : void
return void

Reset() public method

Reset the font to its initial state.
public Reset ( bool startSlide ) : void
startSlide bool If true, () method is called right away.
return void

Slide() public method

Sets the font to visible and begins sliding towards the target position.
public Slide ( ) : void
return void

SlidingFont() public method

public SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, Color tintColor ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
startPosition Vector2
endPosition Vector2
slideSpeed float
tintColor Color
return System

SlidingFont() public method

public SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, String text, Color tintColor ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
startPosition Vector2
endPosition Vector2
slideSpeed float
text String
tintColor Color
return System

SlidingFont() public method

public SlidingFont ( SpriteFont font, Vector2 startPosition, Vector2 endPosition, float slideSpeed, String text, Color tintColor, Vector2 shadowPosition, Color shadowColor ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
startPosition Vector2
endPosition Vector2
slideSpeed float
text String
tintColor Color
shadowPosition Vector2
shadowColor Color
return System

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

calculateSlide() protected method

protected calculateSlide ( ) : void
return void

changeState() protected method

protected changeState ( FontState newState ) : void
newState FontState
return void

Property Details

_distanceToTarget protected_oe property

protected float _distanceToTarget
return float

_slideSpeed protected_oe property

protected float _slideSpeed
return float

_startingPosition protected_oe property

protected Vector2 _startingPosition
return Vector2

_state protected_oe property

protected FontState _state
return FontState

_targetPosition protected_oe property

protected Vector2 _targetPosition
return Vector2

_targetTolerance protected_oe property

protected float _targetTolerance
return float

_unitVectorToTarget protected_oe property

protected Vector2 _unitVectorToTarget
return Vector2