Exemple #1
0
 public override void Awake()
 {
     _menuRpcManager.setIsEntitledToLevelEvent += HandleSetIsEntitledToLevel;
     __buttonBinder.AddBinding(_kickPlayerButton, new Action(base.HandleKickPlayerButtonPressed));
     __buttonBinder.AddBinding(_useBeatmapButton, new Action(base.HandleUseBeatmapButtonPressed));
     __buttonBinder.AddBinding(_useModifiersButton, new Action(base.HandleUseModifiersButtonPressed));
 }
Exemple #2
0
        public void Start()
        {
            gameplayCoreSceneSetupData = gameplayCoreSceneSetup.GetProperty <GameplayCoreSceneSetupData>("sceneSetupData");
            noteCutSoundEffectManager  = gameplayCoreSceneSetup.GetField <NoteCutSoundEffectManager>("_noteCutSoundEffectManager");
            levelDetailViewController  = Resources.FindObjectsOfTypeAll <StandardLevelDetailViewController>().First();

            if (preferredDifficulty == null)
            {
                preferredDifficulty = gameplayCoreSceneSetupData.difficultyBeatmap.difficulty;
            }

            //Listen for restarts so that we can set up the playlist properly on restart
            var restartButton = pauseMenuManager.GetField <Button>("_restartButton");

            buttonBinder = new ButtonBinder();
            buttonBinder.AddBinding(restartButton, () => {
                playlist = new Queue <IPreviewBeatmapLevel>(playlist.Prepend(gameplayCoreSceneSetupData.difficultyBeatmap.level));
                Plugin.instance.loadedLevels = playlist;
            });
        }