protected void UpdateShots(GameTime gameTime)
{
// Loop through shots
for (int i = 0; i < bullets.Count; ++i)
{
// Update each shot
bullets[i].Update(gameTime);
//If shot is out of bounds, remove it from game
Vector3 pos = bullets[i].unit.position ;
if(Math.Abs(pos.Length()) > bulletRange ||
myGame.checkCollisionWithBullet(bullets[i].unit) //||
/*pos.Y < myGame.GetHeightAtPosition(pos.X,pos.Z)*/ )
{
bullets[i].Dispose();
bullets.RemoveAt(i);
--i;
}
}
}