private void shoot(string direct) { bullet shoot = new bullet(); shoot.direction = direct; shoot.bulletLeft = player.Left + (player.Width / 2); shoot.bulletTop = player.Top + (player.Height / 2); shoot.mkBullet(this); }
private void shoot(string direct) { //creates bullets bullet shoot = new bullet(); //Creates new bullet instance shoot.direction = direct; //assigns direction to bullet shoot.bulletLeft = player.Left + (player.Width / 2); // places bullet to left half of player shoot.bulletTop = player.Top + (player.Height / 2); //places bullet to top half of player shoot.mkBullet(this); // runs mkbullet function from bullet class }
private void shoot(string direct) { // this is the function thats makes the new bullets in this game bullet shoot = new bullet(); // create a new instance of the bullet class shoot.direction = direct; // assignment the direction to the bullet shoot.bulletLeft = player.Left + (player.Width / 2); // place the bullet to left half of the player shoot.bulletTop = player.Top + (player.Height / 2); // place the bullet on top half of the player shoot.mkBullet(this); // run the function mkBullet from the bullet class. }
// Shooting private void Shoot(string direct) { if (score % 15 == 0 && score != 0 && specialAmno == 0) { specialAmno = 5; } bullet shoot = new bullet(); shoot.direction = direct; shoot.bulletLeft = player.Left + (player.Width / 2); shoot.bulletTop = player.Top + (player.Height / 2); if (specialAmno > 0) { shoot.mkSpecialBullet(this); specialAmno--; } else { shoot.mkBullet(this); amno--; } }