private static void Lookout_Interact(On.Celeste.Lookout.orig_Interact orig, Lookout self, Player player) { orig(self, player); foreach (Player player2 in self.SceneAs <Level>().Tracker.GetEntities <Player>()) { player2.StateMachine.State = Player.StDummy; } }
private static void Lookout_StopInteracting(On.Celeste.Lookout.orig_StopInteracting orig, Lookout self) { orig(self); foreach (Player player2 in self.SceneAs <Level>().Tracker.GetEntities <Player>()) { player2.StateMachine.State = Player.StNormal; } }
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 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); }