示例#1
0
 public AddDefPosForm(SimulatorManager SM, TypesEnums.UnitSide S)
 {
     InitializeComponent();
     PrimalSimulator = SM;
     Side            = S;
     Init();
 }
示例#2
0
 public UnitsForm(SimulatorManager SM, TypesEnums.UnitSide S, TypesEnums.UnitType T)
 {
     InitializeComponent();
     PrimalSimulator = SM;
     Side            = S;
     Type            = T;
     Init();
     PrimalSimulator.ConsoleBox.WriteLineToConsole("UnitForm READY! Mode: CREATE");
 }
示例#3
0
        public DefencePostionForm(SimulatorManager SM, TypesEnums.UnitSide S)
        {
            InitializeComponent();
            PrimalSimulator = SM;
            Side            = S;

            Init();
            PrimalSimulator.ConsoleBox.WriteLineToConsole("DefencePositionForm : CREATE MODE");
        }
示例#4
0
        public ListUnitForm(SimulatorManager PM, TypesEnums.UnitSide S)
        {
            PrimalManager = PM;
            Side          = S;

            InitializeComponent();
            unitInfo_box.ReadOnly = true;

            LoadData();
        }
示例#5
0
        public Battle(SimulatorManager PM, int luck, int id)
        {
            PrimalSimulator = PM;
            LuckIndex       = luck;
            ID   = id;
            Done = false;

            AllyAmount  = PrimalSimulator.UnitManager.getTotalAmount(TypesEnums.UnitSide.Ally);
            EnemyAmount = PrimalSimulator.UnitManager.getTotalAmount(TypesEnums.UnitSide.Enemy);
        }
示例#6
0
        public SimulatorForm(SimulatorManager SM)
        {
            InitializeComponent();

            PrimalSimulator = SM;
            PrimalSimulator.SimulatorConsoleBox = new ConsoleBox(rbt_siminfo);
            PrimalSimulator.DefenceManager.WriteAllDefposToConsole(PrimalSimulator.SimulatorConsoleBox);
            PrimalSimulator.ProgressBar       = processBar;
            PrimalSimulator.OnSimulationDone += Result;

            num_battles.Value = 100;
            num_luck.Value    = 6;
        }
示例#7
0
 public UnitsForm(SimulatorManager SM, TypesEnums.UnitSide S, IUnit U)
 {
     InitializeComponent();
     PrimalSimulator = SM;
     Side            = S;
     Type            = (TypesEnums.UnitType)U.UnitType;
     Init();
     EditableUnit = U;
     SelectDefPos = U.MyDefPosition;
     if (SelectDefPos != null)
     {
         l_position.Text    = SelectDefPos.ToShortString();
         l_leader.Text      = SelectDefPos.getLeader();
         chbox_hold.Checked = true;
     }
     txt_name.Text = U.UnitName;
     PrimalSimulator.ConsoleBox.WriteLineToConsole("UnitForm READY! Mode: EDIT");
     btn_ok.Text = "Edit unit";
 }
示例#8
0
        public LandForm(SimulatorManager SM)
        {
            InitializeComponent();
            PrimalSimulator = SM;

            check_enable_w.Checked = gb_weather.Visible = PrimalSimulator.LandManager.ActualWeather.Enable;
            check_enable_l.Checked = gb_land.Visible = PrimalSimulator.LandManager.ActualLandLand.Enable;

            tb_hills.ValueChanged   += (sender, e) => { refreshHillsText(); };
            tb_hills.Value           = PrimalSimulator.LandManager.ActualLandLand.HILLS;
            tb_rain.ValueChanged    += (sender, e) => { refreshRainText(); };
            tb_rain.Value            = PrimalSimulator.LandManager.ActualWeather.RAIN;
            tb_visible.ValueChanged += (sender, e) => { refreshVisibleText(); };
            tb_visible.Value         = PrimalSimulator.LandManager.ActualWeather.VISIBLY;
            tb_water.ValueChanged   += (sender, e) => { refreshWaterText(); };
            tb_water.Value           = PrimalSimulator.LandManager.ActualLandLand.WATERS;
            tb_wind.ValueChanged    += (sender, e) => { refreshWindText(); };
            tb_wind.Value            = PrimalSimulator.LandManager.ActualWeather.WIND;
        }
示例#9
0
        public DefencePostionForm(SimulatorManager SM, TypesEnums.UnitSide S, DefPos D)
        {
            InitializeComponent();
            PrimalSimulator = SM;
            Side            = S;

            num_pos_W.Value = D.WeightPosition;
            num_pos_H.Value = D.HeightPosition;
            num_pos_T.Value = D.TallPosition;
            num_pos_D.Value = D.DefencePosition;

            num_wall_W.Value = D.WeightWall;
            num_wall_H.Value = D.HeightWall;
            num_wall_T.Value = D.TallWall;
            num_wall_D.Value = D.DefenceWall;

            txt_name.Text = D.DefPosName;

            Init();
            btn_OK.Text      = "Edit";
            EditablePosition = D;
            PrimalSimulator.ConsoleBox.WriteLineToConsole("DefencePositionForm : EDIT MODE");
        }
示例#10
0
 public TBS()
 {
     InitializeComponent();
     PrimalConsole = new ConsoleBox(rt_console);
     PrimalManager = new SimulatorManager(PrimalConsole, a_chlw_defpos, a_chlw_units, e_chlw_defpos, e_chlw_units);
 }