C# Класс ThreadedPlatformer.Gem

A valuable item the player can collect.
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
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.

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

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

Draws a gem in the appropriate color.
public Draw ( GameTime gameTime, BitmapBatch batch ) : void
gameTime Microsoft.Xna.Framework.GameTime
batch BitmapBatch
Результат void

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

Constructs a new gem.
public Gem ( Level level, Vector2 position ) : System
level Level
position Vector2
Результат System

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

Loads the gem texture and collected sound.
public LoadContent ( ) : void
Результат void

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

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. ///
Результат void

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

Bounces up and down in the air to entice players to collect them.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

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

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

public Color Color
Результат Color