Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public static void Postfix(MultiplayerPlayersManager __instance)
 {
     playerDidFinishEvent(__instance) += delegate { PlatformManager.ChangeToPlatform(0); };
 }
Ejemplo n.º 5
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);
 }
Ejemplo n.º 6
0
 /// <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);
 }