private IEnumerator onWatchtowerUse(On.Celeste.Lookout.orig_LookRoutine orig, Lookout self, Player player)
        {
            UsingWatchtower = true;
            float timeStartedUsing = Engine.Scene.TimeActive;

            IEnumerator origRoutine = orig(self, player);

            while (origRoutine.MoveNext())
            {
                yield return(origRoutine.Current);
            }

            UsingWatchtower = false;

            if (Settings.BadelineChasersEverywhere)
            {
                // adjust chaser state timestamps so that they behave as if the player didn't stand by that watchtower.
                float timeDiff = Engine.Scene.TimeActive - timeStartedUsing;
                for (int i = 0; i < player.ChaserStates.Count; i++)
                {
                    // structs are nice. I have to copy it, modify it, then place it back.
                    Player.ChaserState state = player.ChaserStates[i];
                    state.TimeStamp       += timeDiff;
                    player.ChaserStates[i] = state;
                }
            }
        }
示例#2
0
        private static IEnumerator Lookout_LookRoutine(On.Celeste.Lookout.orig_LookRoutine orig, Lookout self, Player player)
        {
            List <Entity> players = self.SceneAs <Level>().Tracker.GetEntities <Player>();
            Entity        closest = EntityHelper.GetClosestEntity(self, players);

            setPlayerState(players, closest, Player.StDummy);

            yield return(orig(self, closest as Player));

            setPlayerState(players, closest, Player.StNormal);
        }
        private IEnumerator OnLookoutLookRoutine(On.Celeste.Lookout.orig_LookRoutine orig, Celeste.Lookout self, Celeste.Player player)
        {
            IEnumerator enumerator = orig(self, player);

            while (enumerator.MoveNext())
            {
                yield return(enumerator.Current);
            }
            if (Settings.Enabled && player != null)
            {
                doTaxWipe = true;
                player.Die(-Vector2.UnitY);
            }
        }
示例#4
0
        private static IEnumerator Lookout_LookRoutine(On.Celeste.Lookout.orig_LookRoutine orig, Lookout self, Player player)
        {
            List <Entity> players = self.SceneAs <Level>().Tracker.GetEntities <Player>();

            setPlayerState(players, closestLookoutPlayer, Player.StDummy);

            IEnumerator origEnumerator = orig(self, closestLookoutPlayer);

            while (origEnumerator.MoveNext())
            {
                yield return(origEnumerator.Current);
            }

            setPlayerState(players, closestLookoutPlayer, Player.StNormal);
        }
示例#5
0
        private static IEnumerator LookRoutine(On.Celeste.Lookout.orig_LookRoutine orig, Celeste.Lookout self, Celeste.Player player)
        {
            SteamWall steamWall = self.Scene.Tracker.GetEntity <SteamWall>();

            if (steamWall != null)
            {
                steamWall.Halted = true;
            }
            yield return(orig(self, player));

            if (steamWall != null)
            {
                steamWall.Halted = false;
            }
        }
        private static IEnumerator LookRoutine(On.Celeste.Lookout.orig_LookRoutine orig, Celeste.Lookout self, Celeste.Player player)
        {
            SteamWall steamWall = self.Scene.Tracker.GetEntity <SteamWall>();

            if (steamWall != null)
            {
                steamWall.Halted = true;
            }

            IEnumerator enumerator = orig(self, player);

            while (enumerator.MoveNext())
            {
                yield return(enumerator.Current);
            }

            if (steamWall != null)
            {
                steamWall.Halted = false;
            }
        }