static void Postfix(MultiplayerIntroAnimationController __instance, float maxDesiredIntroAnimationDuration, Action onCompleted, ref PlayableDirector ____introPlayableDirector) { ____introPlayableDirector = lastDirector; targetIterations--; if (targetIterations != 0) { __instance.PlayIntroAnimation(maxDesiredIntroAnimationDuration, onCompleted); } }
static void Prefix(MultiplayerIntroAnimationController __instance, ref bool ____bindingFinished, ref PlayableDirector ____introPlayableDirector, ref MultiplayerPlayersManager ____multiplayerPlayersManager) { lastDirector = ____introPlayableDirector; if (targetIterations == 0) { targetIterations = (int)Math.Floor((____multiplayerPlayersManager.allActiveAtGameStartPlayers.Count - 1) / 4f) + 1; } if (targetIterations != 1) { GameObject newPlayableGameObject = new GameObject(); ____introPlayableDirector = newPlayableGameObject.AddComponent <PlayableDirector>(); ____introPlayableDirector.playableAsset = lastDirector.playableAsset; } TimelineAsset mutedTimeline = (TimelineAsset)____introPlayableDirector.playableAsset; foreach (TrackAsset track in mutedTimeline.GetOutputTracks()) { track.muted = track is AudioTrack && targetIterations != 1; } ____bindingFinished = false; }