Ejemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (IsKilled && useDeathAnim)
            {
                Game.stateManager.shooterState.backgroundObjects.Add(
                    ExplosionGenerator.GenerateShipExplosion(Game, spriteSheet, this));
            }

            if (movement != Movement.None)
            {
                movementModule.Update(gameTime, this);
            }

            CheckWallCollision();

            if (hasShield)
            {
                currentShield += shieldRegeneration * MathFunctions.FPSSyncFactor(gameTime);
                if (currentShield > shieldCapacity)
                {
                    currentShield = shieldCapacity;
                }
            }

            DisruptionLogic(gameTime);

            if (!IsDisrupted)
            {
                ObjectColor = GetDamageTintColor();
            }
        }
 public override bool Activate()
 {
     game.player.UnlockDevelopHyperSpeed();
     PopupHandler.DisplayMessage(activationMessage);
     game.stateManager.overworldState.AddEffectsObject(ExplosionGenerator.GenerateSpaceDuckExplosion(game, game.spriteSheetVerticalShooter, spaceDuck));
     game.stateManager.overworldState.GetSectorX.RemoveGameObject(spaceDuck);
     return(true);
 }
Ejemplo n.º 3
0
        private void Explode()
        {
            Explosion expl = ExplosionGenerator.GenerateBombExplosion(Game, spriteSheet, this);

            CircularAreaDamage areaExpl = new CircularAreaDamage(Game, AreaDamageType.player, this.Position, blastDamage, blastRadius);

            //areaExpl.Damage = blastDamage;

            Game.stateManager.shooterState.backgroundObjects.Add(expl);
            Game.stateManager.shooterState.gameObjects.Add(areaExpl);
        }
Ejemplo n.º 4
0
        private void Explode()
        {
            IsKilled = true;

            Explosion expl = ExplosionGenerator.GenerateBombExplosion(Game, spriteSheet, this);

            CircularAreaDamage areaExpl = new CircularAreaDamage(Game, AreaDamageType.enemy, this.Position, blastDamage, blastRadius);

            areaExpl.Initialize();

            Game.stateManager.shooterState.backgroundObjects.Add(expl);
            Game.stateManager.shooterState.gameObjects.Add(areaExpl);
        }
Ejemplo n.º 5
0
        public override void InflictDamage(GameObjectVertical obj)
        {
            Game.stateManager.shooterState.backgroundObjects.Add(
                ExplosionGenerator.GenerateBulletExplosion(Game, spriteSheet, this));

            if (obj is AreaShieldCollision)
            {
                HP = 0;
            }
            else
            {
                HP -= obj.HP;
            }
        }
Ejemplo n.º 6
0
 public void Explode()
 {
     Game.stateManager.overworldState.AddEffectsObject(ExplosionGenerator.GenerateOverworldExplosion(Game, Game.spriteSheetVerticalShooter, this));
     Game.stateManager.overworldState.AddEffectsObject(ExplosionGenerator.GenerateOverworldExplosion(Game, Game.spriteSheetVerticalShooter, this));
 }