Beispiel #1
0
        private void GérerTir(GameTime gameTime)
        {
            if (MissileTimerProj > 0)
            {
                MissileTimerProj -= (float)gameTime.ElapsedGameTime.TotalSeconds;
            }
            else if (Missiles <= MAX_MISSILES)
            {
                if (Input.GetKey(Keys.Up))
                {
                    ++Missiles;
                    MissileTimerProj = FIRE_RATE_BASE;
                    Projectile p = new Projectile(Game, 0.8f, Vector3.Zero, Position + Vector3.Forward * 0.05f, this, LaneIndex);
                    SonProjectile.Play(0.3f,0f,0f);
                    Game.Components.Add(p);
                }
            }

            if (Input.GetKeyDown(Keys.Down))
            {
                level_.SuperZapper();
            }
        }
Beispiel #2
0
 private void Fire()
 {
     Projectile p = new Projectile(Game, 0.8f, Vector3.Zero, Position + Vector3.Forward * 0.3f, this, LaneIndex);
     Game.Components.Add(p);
 }