Пример #1
0
        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.
        }
Пример #2
0
        private void shoot(string direct)
        {
            // this function makes new bullets
            // new instance of bullet class
            bullet shoot = new bullet();

            // assign direction to bullet
            shoot.direction = direct;
            // place the bullet to left half of player
            shoot.bulletLeft = player.Left + (player.Width / 2);
            // place the bullet on top half of player
            shoot.bulletTop = player.Top + (player.Height / 2);
            // run the make bullet function from bullet class
            shoot.mkBullet(this);
        }