public static void Postfix(MultiplayerConnectedPlayerLevelFailController __instance, IConnectedPlayer player)
 {
     if (player.userId != _connectedPlayer(__instance).userId)
     {
         return;
     }
     if (_wasActive(__instance) && (!player.IsActiveOrFinished() || !player.isConnected))
     {
         PlatformManager.ChangeToPlatform(0);
     }
 }
Пример #2
0
 /// <summary>
 /// Changing to the current platform when the menu is shown<br/>
 /// [Called by Beat Saber]
 /// </summary>
 /// <param name="firstActivation">Was this the first activation?</param>
 /// <param name="type">Type of activation</param>
 protected override void DidActivate(bool firstActivation, ActivationType type)
 {
     PlatformManager.ChangeToPlatform();
     base.DidActivate(firstActivation, type);
 }
Пример #3
0
 /// <summary>
 /// Swapping back to the standard menu environment when the menu is closed<br/>
 /// [Called by Beat Saber]
 /// </summary>
 /// <param name="deactivationType">Type of deactivation</param>
 protected override void DidDeactivate(DeactivationType deactivationType)
 {
     PlatformManager.ChangeToPlatform(0);
     base.DidDeactivate(deactivationType);
 }
 public static void Postfix(MultiplayerPlayersManager __instance)
 {
     playerDidFinishEvent(__instance) += delegate { PlatformManager.ChangeToPlatform(0); };
 }
 /// <summary>
 /// Changing to the current platform when the menu is shown<br/>
 /// [Called by Beat Saber]
 /// </summary>
 protected override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
 {
     PlatformManager.ChangeToPlatform();
     base.DidActivate(firstActivation, addedToHierarchy, screenSystemEnabling);
 }
 /// <summary>
 /// Swapping back to the standard menu environment when the menu is closed<br/>
 /// [Called by Beat Saber]
 /// </summary>
 protected override void DidDeactivate(bool removedFromHierarchy, bool screenSystemDisabling)
 {
     PlatformManager.ChangeToPlatform(0);
     base.DidDeactivate(removedFromHierarchy, screenSystemDisabling);
 }