Esempio n. 1
0
 public override void Update()
 {
     base.Update();
     if (_frontSprite != null && _stage > 0 && !_frontSprite.Animating)
     {
         Remove(_frontSprite);
         _frontSprite = null;
     }
     if (_stage == 2 && _backSprite.CurrentAnimationID == "break1" && _backSprite.CurrentAnimationFrame == 3)
     {
         _stage++;
         CrystalDebris.Burst(Position, Color.DarkRed, false, 16);
         Collidable     = false;
         _light.Visible = false;
         Depth          = 8000;
         Add(new Coroutine(SpawnSteam()));
         Level level = Scene as Level;
         level.Session.SetFlag("Machine_Heart_Destroyed");
         level.Displacement.AddBurst(Position, 1f, 8f, 256f, 0.5f);
         foreach (DashBlock dashBlock in level.Tracker.GetEntities <DashBlock>())
         {
             dashBlock.Break(dashBlock.CenterLeft, Vector2.UnitX, true);
         }
     }
 }
        public void Destroy(bool boss = false)
        {
            if (InView())
            {
                Audio.Play("event:/game/06_reflection/fall_spike_smash", Position);
                Color color = Calc.HexToColor(destroyColor);

                CrystalDebris.Burst(Position, color, boss, 8);
            }
            RemoveSelf();
        }