コード例 #1
0
 static bool Prefix(ref string userId, ref BeatmapIdentifierNetSerializable beatmapId, ref GameplayModifiers gameplayModifiers, ref float startTime, LobbyGameStateController __instance)
 {
     Plugin.Log?.Debug($"LobbyGameStateController.HandleMenuRpcManagerStartedLevel");
     if (SongCore.Loader.GetLevelById(beatmapId.levelID) != null)
     {
         Plugin.Log.Debug($"Level is loaded.");
     }
     LobbyGameStateController = __instance;
     LastUserId = userId;
     return(true);
 }
コード例 #2
0
        public static void Postfix(LobbyGameStateController __instance)
        {
            var nextState = __instance.GetProperty <MultiplayerLobbyState, LobbyGameStateController>("state");

            if (nextState != LobbyState)
            {
                LobbyState = nextState;
                Plugin.Log?.Debug($"Lobby state change: {LobbyState}");

                GameStateManager.HandleUpdate();
            }
        }