Beispiel #1
0
        public void Update(GameTime gameTime, bool cutScene) //NEEDS FIX
        {
            if (IsActive)
            {
                Hull.Color = Color.White; //Move to Respawn()
                //if (ControlScheme != 4)
                //    CalculateAngle();
                base.Update(gameTime, cutScene);
                if (!cutScene)
                {
                    Fire();
                }
                //if (Health <= 0 && IsActive)
                //    Death();

                if (Health <= maxHealth / 4)
                {
                    Particles.GenerateParticles(Hull.Sprite.Edges, Position, Hull.Sprite.Origin, 13, Angle);
                }
                if (!cutScene)
                {
                    KeepPlayerInScreen();
                }
            }
        }
 protected override void HandleCollision(ICollidable c2)
 {
     if (c2 is Enemy || c2 is Wall)
     {
         Particles.GenerateParticles(Position, 5, 0, Sprite.MColor);
         Death();
     }
 }
 public override void TakeAction()
 {
     buttonReleased = false;
     if (!charging)
     {
         charging = true;
     }
     bullet.Health += 1000;
     Particles.GenerateParticles(Position, 3, angle, new Color(1, 0.15f + 0.85f * (1 - chargeTimer.currentTime / chargeTimer.maxTime), (1 - chargeTimer.currentTime / chargeTimer.maxTime), 0.5f + 0.5f * (1 - chargeTimer.currentTime / chargeTimer.maxTime)));
 }
Beispiel #4
0
 public override void Update(GameTime gameTime)
 {
     if (Team == EntityConstants.GetStatsFromID(EntityConstants.TEAM, IDs.DEFAULT_ENEMY)) // Flytta detta till particles?
     {
         Particles.GenerateParticles(Position, 4, Angle + (float)Math.PI, Color.Purple);
     }
     else
     {
         Particles.GenerateParticles(Position, 4, Angle + (float)Math.PI, Color.MonoGameOrange);
     }
 }
Beispiel #5
0
 public override void Update(GameTime gameTime)
 {
     if (exploding)
     {
         Particles.GenerateParticles(Position, 9);
         explosionTimer.CountDown(gameTime);
     }
     if (explosionTimer.IsFinished)
     {
         Death();
     }
     base.Update(gameTime);
 }
Beispiel #6
0
 protected virtual void TrailParticles()
 {
     Particles.GenerateParticles(Position, 6, Angle, Sprite.PrimaryColor);
 }
 protected override void TrailParticles()
 {
     Particles.GenerateParticles(Position, 10, Angle, Sprite.PrimaryColor);
 }
 public override void Death()
 {
     Particles.GenerateParticles(Position, 12); //Death animation
     base.Death();
 }