C# Class GPSTD_RM.BasicProjectile

Inheritance: Projectile
Show file Open project: dideler/gps-tower-defense Class Usage Examples

Protected Properties

Property Type Description
gotTargets bool
initialPosition Vector2
lastPosition Vector2

Public Methods

Method Description
BasicProjectile ( Microsoft.Xna.Framework.Game g ) : System

Basic constructor.

BasicProjectile ( Microsoft.Xna.Framework.Game g, Vector2 position, Vector2 velocity, int attackPower ) : System

Full constructor, inherited from the projectile constructor.

Update ( GameTime time ) : void

Checks for collisions with any creep, deals damage and destroys itself.

Protected Methods

Method Description
CollisionEffect ( Creep c ) : void

What happens when this projectile collides with a creep.

Method Details

BasicProjectile() public method

Basic constructor.
public BasicProjectile ( Microsoft.Xna.Framework.Game g ) : System
g Microsoft.Xna.Framework.Game The game containing this object.
return System

BasicProjectile() public method

Full constructor, inherited from the projectile constructor.
public BasicProjectile ( Microsoft.Xna.Framework.Game g, Vector2 position, Vector2 velocity, int attackPower ) : System
g Microsoft.Xna.Framework.Game The game containing this object.
position Vector2 Initial position.
velocity Vector2 Initial velocity.
attackPower int How much damage will it do?
return System

CollisionEffect() protected method

What happens when this projectile collides with a creep.
protected CollisionEffect ( Creep c ) : void
c Creep The creep on which to apply the collision effect.
return void

Update() public method

Checks for collisions with any creep, deals damage and destroys itself.
public Update ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime Current game time.
return void

Property Details

gotTargets protected property

TODO
protected bool gotTargets
return bool

initialPosition protected property

protected Vector2 initialPosition
return Vector2

lastPosition protected property

protected Vector2 lastPosition
return Vector2