Esempio n. 1
0
        public override void Update()
        {
            base.Update();

            Player player = SceneAs <Level>().Tracker.GetEntity <Player>();

            if (ExtendedVariantsModule.ShouldEntitiesAutoDestroy(player))
            {
                RemoveSelf();
            }
        }
        public override void Update()
        {
            base.Update();

            Player player = SceneAs <Level>().Tracker.GetEntity <Player>();

            if (player != null && ExtendedVariantsModule.ShouldEntitiesAutoDestroy(player) && !triggeredLeave)
            {
                // we should destroy lava/ice
                Leave();
                triggeredLeave = true;
            }
        }
Esempio n. 3
0
        public override void Update()
        {
            base.Update();

            Level  level  = SceneAs <Level>();
            Player player = level.Tracker.GetEntity <Player>();

            if (ExtendedVariantsModule.ShouldEntitiesAutoDestroy(player))
            {
                // during cutscenes, tell Oshiro to get outta here the same way as Badeline
                // (we can't use the "official" way of making him leave because that doesn't cancel his attack.
                // A Badeline vanish animation looks weird but nicer than a flat out disappearance imo)
                level.Displacement.AddBurst(Entity.Center, 0.5f, 24f, 96f, 0.4f, null, null);
                level.Particles.Emit(BadelineOldsite.P_Vanish, 12, Entity.Center, Vector2.One * 6f);
                Entity.RemoveSelf();

                // make sure that the anxiety set by Oshiro went away (why doesn't that work in real life tho)
                Distort.Anxiety  = 0;
                Distort.GameRate = 1;
            }
        }
        public override void Update()
        {
            // if Badeline is waiting for a watchtower, stop updating it so that she doesn't go forward.
            if (!waitingForWatchtower)
            {
                base.Update();

                Level  level  = SceneAs <Level>();
                Player player = level.Tracker.GetEntity <Player>();

                if (ExtendedVariantsModule.ShouldEntitiesAutoDestroy(player))
                {
                    // we are in a cutscene **but not the Badeline Intro one**
                    // so we should just make the chasers disappear to prevent them from killing the player mid-cutscene
                    level.Displacement.AddBurst(Center, 0.5f, 24f, 96f, 0.4f, null, null);
                    level.Particles.Emit(P_Vanish, 12, Center, Vector2.One * 6f);

                    if (!BadelineChasersEverywhere.UsingWatchtower)
                    {
                        // cutscene!
                        RemoveSelf();
                    }
                    else
                    {
                        // waiting for watchtower: just become invisible instead.
                        waitingForWatchtower = true;
                        Visible = false;
                    }
                }
            }
            else if (!BadelineChasersEverywhere.UsingWatchtower)
            {
                // using the watchtower is over, make Badeline appear again!
                waitingForWatchtower = false;
                Visible = true;

                SceneAs <Level>().Displacement.AddBurst(Center, 0.5f, 24f, 96f, 0.4f, null, null);
                SceneAs <Level>().Particles.Emit(P_Vanish, 12, Center, Vector2.One * 6f);
            }
        }
Esempio n. 5
0
        public override void Update()
        {
            base.Update();

            Player player = SceneAs <Level>().Tracker.GetEntity <Player>();

            if (ExtendedVariantsModule.ShouldEntitiesAutoDestroy(player))
            {
                // kill the boss no matter what
                RemoveSelf();

                // and kill all the beams and shots as well, they could still kill the player!
                foreach (FinalBossShot shot in SceneAs <Level>().Tracker.GetEntities <FinalBossShot>())
                {
                    shot.Destroy();
                }
                foreach (FinalBossBeam beam in SceneAs <Level>().Tracker.GetEntities <FinalBossBeam>())
                {
                    beam.Destroy();
                }
            }
        }