C# 클래스 ThreadedPlatformer.Gem

A valuable item the player can collect.
파일 보기 프로젝트 열기: sq/Fracture 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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