public void EnemyShoot() { if (reloadTime >= 0) { reloadTime--; } if (reloadTime <= 0) { CannonBall newBall = new CannonBall(ballTexture); newBall.position = new Vector2(position.X, position.Y); newBall.isVisible = true; ballList.Add(newBall); } if (reloadTime <= 0) { reloadTime = 80; } }
public void Shoot() { if (reloadTime >= 0) { reloadTime--; } if (shotsFired == true && reloadTime <= 0) { CannonBall newBall = new CannonBall(ballTexture); //try to start at cannon newBall.position = new Vector2(position.X, position.Y); newBall.isVisible = true; ballList.Add(newBall); } if (shotsFired == true && reloadTime <= 0) { shotsFired = false; reloadTime = 30; } }