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
Afficher le fichier Open project: Bacon41/PantheonPrototype Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
setDirection ( ) : void

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

Method Details

Bullet() public méthode

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
Résultat System

Draw() public méthode

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.
Résultat void

Load() public méthode

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
Résultat void

Update() public méthode

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.
Résultat void