Esempio n. 1
0
        public Log(GCM gcm)
        {
            this.gcm = gcm;

            SetSettings(GameSettingsLoader.LoadSettingsFromFile());

            Add(this);
        }
        void OnOkayEntrySelected(PlayerIndex playerIndex)
        {
            var hexString = GetHexString();

            if (!Seed.TryParse(hexString, out var seed))
            {
                ShowErrorDescription("Invalid seed id, it is not a valid hexidecimal value.");
                return;
            }

            if (!forceSeed && !Randomizer.IsBeatable(seed, FillingMethod.Random))
            {
                ShowErrorDescription("Invalid seed id, it cannot be beaten.");
                return;
            }

            difficultyMenu.SetSeedAndFillingMethod(seed, FillingMethod.Random, GameSettingsLoader.LoadSettingsFromFile());

            Dynamic.OnCancel(playerIndex);
        }
        public override void Initialize(ItemLocationMap itemLocationMap, GCM gameContentManager)
        {
            gcm = gameContentManager;

            if (!IsUsedAsGameSettingsMenu)
            {
                return;
            }

            Dynamic._menuTitle = "Game Settings";

            var gameplayScreen = ScreenManager.FirstOrDefault <GameplayScreen>();

            save = gameplayScreen?.Save;

            settings = IsInGame
                                ? gameplayScreen.Settings
                                : GameSettingsLoader.LoadSettingsFromFile();

            ResetMenu();
        }