X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=CarFire%2FCarFire%2FCharacterTestBed%2FProjectile.cs;h=acf5d33b092668df400ba0ec7421c32b2ed3613d;hb=bc2e2a26b4dd7fa7e62ec4c93064ae80eef0b010;hp=a49476c25e1bef1bf1622338bc5c2e3c93405e92;hpb=2eb9216eac3321adc2f897068396e7fb1f126089;p=chaz%2Fcarfire diff --git a/CarFire/CarFire/CharacterTestBed/Projectile.cs b/CarFire/CarFire/CharacterTestBed/Projectile.cs index a49476c..acf5d33 100644 --- a/CarFire/CarFire/CharacterTestBed/Projectile.cs +++ b/CarFire/CarFire/CharacterTestBed/Projectile.cs @@ -10,7 +10,7 @@ using Microsoft.Xna.Framework.Input; namespace CarFire { /// - /// This class represents a projectile object. + /// This class represents a projectile object that will be spawned whenever a player or a monster fires. /// public class Projectile { @@ -68,8 +68,8 @@ namespace CarFire // to move into the path of projectiles. if (open) { - pixelX += velocity.X; - pixelY += velocity.Y; + pixelX += (int)velocity.X; + pixelY += (int)velocity.Y; gridX = pixelX / theMap.gridToPixelRatio; gridY = pixelY / theMap.gridToPixelRatio; } @@ -83,8 +83,8 @@ namespace CarFire //If it is not moving grid positions just increment pixelX and pixelY else { - pixelX += velocity.X; - pixelY += velocity.Y; + pixelX += (int)velocity.X; + pixelY += (int)velocity.Y; } } @@ -106,7 +106,6 @@ namespace CarFire public int GridY { get { return gridY; } set { gridY = value; } } public int PixelX { get { return pixelX; } set { pixelX = value; } } public int PixelY { get { return pixelY; } set { pixelY = value; } } - public int Health { get { return health; } set { health = value; } } public Map TheMap { get { return theMap; } set { theMap = value; } } } }