C# Class ThreadedPlatformer.Gem

A valuable item the player can collect.
Afficher le fichier Open project: sq/Fracture Class Usage Examples

Méthodes publiques

Свойство Type Description
Color Color

Méthodes publiques

Méthode Description
Draw ( GameTime gameTime, BitmapBatch batch ) : void

Draws a gem in the appropriate color.

Gem ( Level level, Vector2 position ) : System

Constructs a new gem.

LoadContent ( ) : void

Loads the gem texture and collected sound.

OnCollected ( Player collectedBy ) : void

Called when this gem has been collected by a player and removed from the level.

Update ( GameTime gameTime ) : void

Bounces up and down in the air to entice players to collect them.

Method Details

Draw() public méthode

Draws a gem in the appropriate color.
public Draw ( GameTime gameTime, BitmapBatch batch ) : void
gameTime Microsoft.Xna.Framework.GameTime
batch BitmapBatch
Résultat void

Gem() public méthode

Constructs a new gem.
public Gem ( Level level, Vector2 position ) : System
level Level
position Vector2
Résultat System

LoadContent() public méthode

Loads the gem texture and collected sound.
public LoadContent ( ) : void
Résultat void

OnCollected() public méthode

Called when this gem has been collected by a player and removed from the level.
public OnCollected ( Player collectedBy ) : void
collectedBy Player /// The player who collected this gem. Although currently not used, this parameter would be /// useful for creating special powerup gems. For example, a gem could make the player invincible. ///
Résultat void

Update() public méthode

Bounces up and down in the air to entice players to collect them.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

Color public_oe property

public Color Color
Résultat Color