Texture2D _projectileModel,\r
Vector2 _velocity,\r
int _gridX,\r
- int _gridY,\r
+ int _gridY)\r
+ /*,\r
int _pixelX,\r
- int _pixelY)\r
+ int _pixelY)*/\r
{\r
theMap = _currentMap;\r
projectileModel = _projectileModel;\r
velocity = _velocity;\r
gridX = _gridX;\r
gridY = _gridY;\r
- pixelX = _pixelX;\r
- pixelY = _pixelY;\r
+ pixelX = _gridX * (int)Map.PixelsToUnitSquares;\r
+ pixelY = _gridY * (int)Map.PixelsToUnitSquares;\r
+ damage = 20;\r
}\r
public void Update(TimeSpan timespan)\r
{\r
//If the projectile will be moving to a new grid position we need to check to see if it is occupied.\r
if ((int)((pixelX + velocity.X) / Map.PixelsToUnitSquares) != gridX || (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares) != gridY)\r
{\r
- bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares));\r
+ //bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares));\r
//If open just move this projectile there\r
//***Map doesn't need to know that this projectile is there because players/monsters are allowed\r
// to move into the path of projectiles.\r
- if (open)\r
+ //if (open)\r
{\r
- Console.WriteLine("pixelX:" + pixelX + " " + " pixelY: "+ pixelY);\r
+ //Console.WriteLine("pixelX:" + pixelX + " " + " pixelY: "+ pixelY);\r
pixelX += (int)velocity.X;\r
pixelY += (int)velocity.Y;\r
gridX = (int)(pixelX /Map.PixelsToUnitSquares);\r