private static void Postfix(MultiplayerLocalActivePlayerGameplayManager __instance, SaberManager ____saberManager)
        {
            multiplayerSaberManager = ____saberManager;
#if DEBUG
            AlternativePlay.Logger.Notice($"SaberManager Set in MultiplayerLocalActivePlayerGameplayManager");
#endif
        }
Exemple #2
0
        private void MultiplayerLocalActivePlayerGameplayManagerHasStarted(MultiplayerLocalActivePlayerGameplayManager multiplayerLocalActivePlayerGameplayManager)
        {
            patch.MultiplayerLocalActivePlayerGameplayManagerHasStarted -= MultiplayerLocalActivePlayerGameplayManagerHasStarted;
            SaberManager saberManager = Accessors.SaberManagerAccessor(ref multiplayerLocalActivePlayerGameplayManager);

            leftController       = saberManager?.leftSaber.GetComponentInParent <VRController>();
            rightController      = saberManager?.rightSaber.GetComponentInParent <VRController>();
            leftController.node  = UnityEngine.XR.XRNode.RightHand;
            rightController.node = UnityEngine.XR.XRNode.LeftHand;
        }
        static bool Prefix(MultiplayerLocalActivePlayerGameplayManager __instance)
        {
            //Logger.Trace("In StandardLevelGameplayManager.HandleSongDidFinish()");
            try
            {
                if (BailOutController.instance == null)
                {
                    return(true);
                }
                if (BailOutController.instance.numFails > 0)
                {
                    Logger.log.Debug("Fail detected in BailOutController, forcing level failed");
                    __instance.HandleGameEnergyDidReach0();
                    return(false);
                }
            }
            catch (Exception ex)
            {
                Logger.log.Error($"Error in MultiplayerLocalActivePlayerGameplayManagerHandleSongDidFinish: {ex.Message}");
                Logger.log.Debug(ex);
            }

            return(false);
        }
 private void Patch(MultiplayerLocalActivePlayerGameplayManager __instance)
 {
     MultiplayerLocalActivePlayerGameplayManagerHasStarted?.Invoke(__instance);
 }