C# Class PantheonPrototype.Bullet

A bullet object meant to hurt people, porcupines, or pinapple. Bullets inherit from projectile and add the capacity to deal damage. In this initial implementation, they will be a leaf class with its own image etc...
Inheritance: Projectile
Mostrar archivo Open project: Bacon41/PantheonPrototype Class Usage Examples

Public Methods

Method Description
Bullet ( Vector2 location, int speed, float angle, int range, int damage, Pantheon gameReference ) : System

The constructor assumes that you are generating the bullet from a given location at a given velocity.

Draw ( SpriteBatch canvas ) : void

Draws the bullet... yes it does.

Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager, String type ) : void

Loads the bullet.

Update ( GameTime gameTime, Pantheon gameReference ) : void

May the bullet update evermore... or at least until it reaches the edge of the screen...

Private Methods

Method Description
setDirection ( ) : void

Sets the direction of the sprite based on the current velocity.

Method Details

Bullet() public method

The constructor assumes that you are generating the bullet from a given location at a given velocity.
public Bullet ( Vector2 location, int speed, float angle, int range, int damage, Pantheon gameReference ) : System
location Vector2 The initial position for the bullet.
speed int
angle float
range int
damage int
gameReference Pantheon
return System

Draw() public method

Draws the bullet... yes it does.
public Draw ( SpriteBatch canvas ) : void
canvas Microsoft.Xna.Framework.Graphics.SpriteBatch The thingy onto which the bullet is drawn.
return void

Load() public method

Loads the bullet.
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager, String type ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager Using this content manager.
type String
return void

Update() public method

May the bullet update evermore... or at least until it reaches the edge of the screen...
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime The amount of time since last calling the Update function.
gameReference Pantheon The reference to life the universe and everything.
return void