Esempio n. 1
0
 public void Copy(ArmyParameters Copy)
 {
     Faction    = Copy.Faction;
     Points     = Copy.Points;
     Team       = Copy.Team;
     Parameters = Copy.Parameters;
 }
        void HandleParametersChanged(object Sender, EventArgs E)
        {
            if (_YearSelect.Value == null ||
                _SettingSelect.Value == null ||
                _TurnsSelect.Value == null)
            {
                return;
            }

            var width  = ValidateIntegerInput(_MapWidthInput.Value);
            var height = ValidateIntegerInput(_MapHeightInput.Value);

            if (width == 0 || height == 0)
            {
                return;
            }

            var parameters =
                new ScenarioParameters(
                    _YearSelect.Value.Value,
                    _SettingSelect.Value.Value,
                    _TurnsSelect.Value.Value,
                    new Coordinate(width, height),
                    _FogOfWarCheckbox.Value);

            if (OnParametersChanged != null)
            {
                OnParametersChanged(this, new ValuedEventArgs <ScenarioParameters>(parameters));
            }
        }
Esempio n. 3
0
 public ArmyParameters(Faction Faction, uint Points, byte Team, ScenarioParameters Parameters)
 {
     this.Faction    = Faction;
     this.Points     = Points;
     this.Team       = Team;
     this.Parameters = Parameters;
 }
 public void Copy(ScenarioParameters Parameters)
 {
     Year     = Parameters.Year;
     Setting  = Parameters.Setting;
     Turns    = Parameters.Turns;
     MapSize  = Parameters.MapSize;
     FogOfWar = Parameters.FogOfWar;
 }
        public override Pod SetupState(ProgramContext ProgramContext, ProgramStateContext ProgramStateContext)
        {
            var defaultParameters =
                new ScenarioParameters(
                    1939, GameData.MatchSettings.Values.First(), 8, new Coordinate(33, 33), false);

            _ScenarioBuilder = new ScenarioBuilder(defaultParameters);

            var screen = new ScenarioBuilderScreen(ProgramContext.ScreenResolution, _ScenarioBuilder);

            screen.OnMainMenuButtonClicked += HandleBack;

            _Controller             = new ScenarioBuilderController(_ScenarioBuilder, screen);
            _Controller.OnFinished += HandleFinished;

            return(screen);
        }
 public bool SetParameters(ScenarioParameters Parameters)
 {
     this.Parameters.Copy(Parameters);
     return(true);
 }
 public ScenarioBuilder(ScenarioParameters Parameters)
 {
     this.Parameters = Parameters;
 }
 public SetScenarioParametersAction(ScenarioParameters Parameters)
 {
     this.Parameters = Parameters;
 }