C# Class PGCGame.Bullet

Inheritance: Sprite
显示文件 Open project: GreatMindsRobotics/PGCGame Class Usage Examples

Public Properties

Property Type Description
MaximumDistance Vector2?
ParentShip Ship

Public Methods

Method Description
Bullet ( Texture2D texture, Vector2 location, SpriteBatch spriteBatch, Ship parentShip ) : System
InitializePooledBullet ( Vector2 pos, Ship parent ) : void

Initialize a bullet that has been retrieved from the pool.

Update ( ) : void

Private Methods

Method Description
DoSpeedPlus ( ) : void

Method Details

Bullet() public method

public Bullet ( Texture2D texture, Vector2 location, SpriteBatch spriteBatch, Ship parentShip ) : System
texture Texture2D
location Vector2
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
parentShip Ship
return System

InitializePooledBullet() public method

Initialize a bullet that has been retrieved from the pool.
public InitializePooledBullet ( Vector2 pos, Ship parent ) : void
pos Vector2
parent Ship
return void

Update() public method

public Update ( ) : void
return void

Property Details

MaximumDistance public_oe property

The maximum distance a bullet can travel before death. If null, it can travel indefinently.
public Vector2? MaximumDistance
return Vector2?

ParentShip public_oe property

public Ship,PGCGame ParentShip
return Ship