Beispiel #1
0
        public void Shoot()
        {
            long CurrentShot = Program.GetCurrentTimeMillis();

            if (CurrentShot - LastShot > SHOT_DELAY)
            {
                LastShot = CurrentShot;

                Sound.Shoot.Play();

                int[]  Spo = GetBulletStartPositionOffsets();
                Bullet B   = new Bullet(X + Spo[0], Y + Spo[1], Id, Direction, false, true);
                GameLevel.AddBullet(B);

                GameLevel.AddParticle(new BarrelFlame(X, Y, Direction, true));
            }
        }
Beispiel #2
0
        public void Shoot(bool justShoot = false)
        {
            long CurrentShot = Program.GetCurrentTimeMillis();

            if ((GameGuiScreen.IsPlaying() && !IsHolding() && !BindingMaster && !Shooting && CurrentShot - LastShot > SHOT_DELAY && Ammunition > 0) || justShoot)
            {
                if (IsMe(Id))
                {
                    ++GameComponent.Gs.IntStatsShots;
                }

                LastShot = CurrentShot;
                Shooting = true;
                --Ammunition;

                Sound.Shoot.Play();

                int[]  Spo = GetBulletStartPositionOffsets();
                Bullet B   = new Bullet(X + Spo[0], Y + Spo[1], Id, Direction, Bonus.IsAPBulletsA());
                GameLevel.AddBullet(B);

                GameLevel.AddParticle(new BarrelFlame(X, Y, Direction, false));
            }
        }