Exemplo n.º 1
0
        public void setDoShooting(bool shoot)
        {
            //------------------------------------------------------------------------------------------------------------------
            // Purpose: Method (set invader to init shooting)
            //-----------------------------------------------------------------------------------------------------------------

            if (shoot)
            {
                this.bullet = new clsInvaderBullet(base.getX() + 10, base.getY());
                this.shoot  = shoot;

                this.bullet2 = new clsInvaderBullet(base.getX() + 7, base.getY());
                //this.shoot2 = shoot;
            }
            else
            {
                this.bullet  = null;
                this.bullet2 = null;
                this.shoot   = false;
            }
        }
Exemplo n.º 2
0
        public void doShoot(Graphics Destination)
        {
            //------------------------------------------------------------------------------------------------------------------
            // Purpose: Method to control the invaders bullets
            //------------------------------------------------------------------------------------------------------------------


            if (this.bullet.getY() < ScreenHeight)
            {
                // Shift bullets down the screen
                if (this.bullet != null)
                {
                    this.bullet.moveBullets(Destination, 0);
                    this.bullet2.moveBullets(Destination, 2);
                }
            }
            else //- bullet has moved off the screen then kill off instance
            {
                this.bullet  = null;
                this.shoot   = false;
                this.bullet2 = null;
            }
        }
Exemplo n.º 3
0
        public void setDoShooting(bool shoot)
        {
            //------------------------------------------------------------------------------------------------------------------
            // Purpose: Method (set invader to init shooting)
            //-----------------------------------------------------------------------------------------------------------------

            if (shoot)
            {
                this.bullet = new clsInvaderBullet(base.getX() + 10, base.getY());
                this.shoot = shoot;

                this.bullet2 = new clsInvaderBullet(base.getX() + 7, base.getY());
                //this.shoot2 = shoot;

            }
            else
            {
                this.bullet = null;
                this.bullet2 = null;
                this.shoot = false;
            }
        }
Exemplo n.º 4
0
        public void doShoot(Graphics Destination)
        {
            //------------------------------------------------------------------------------------------------------------------
            // Purpose: Method to control the invaders bullets
            //------------------------------------------------------------------------------------------------------------------

            if (this.bullet.getY() < ScreenHeight)
            {
                // Shift bullets down the screen
                if (this.bullet != null)
                {
                    this.bullet.moveBullets(Destination,0);
                    this.bullet2.moveBullets(Destination,2);
                }
            }
            else //- bullet has moved off the screen then kill off instance
            {
                this.bullet = null;
                this.shoot = false;
                this.bullet2 = null;
            }
        }