Exemplo n.º 1
0
 private void Build()
 {
     foreach (var type in Enum.GetValues(typeof(TypeEntite)))
     {
         int        n = 0;
         TypeEntite t = (TypeEntite)type;
         while (n < _reserveAstronef.NombreUnite(t))
         {
             _reserve.AddUnit(UnitFactory.BuildUnitHMI(t, null, _spaceship.Unite.Joueur));
             n++;
         }
     }
 }
Exemplo n.º 2
0
        public CanvasTestWindow()
        {
            InitializeComponent();
            UnitListView units  = new UnitListView();
            UnitListView units2 = new UnitListView();

            Canvas.SetLeft(units, 20);
            Canvas.SetTop(units, 20);
            canvas.Children.Add(units);
            Canvas.SetLeft(units2, 700);
            Canvas.SetTop(units2, 20);
            canvas.Children.Add(units2);
            // adding elements
            units.AddUnit(new Spaceship(new Gros_Tas(null, null), null));
        }
        private void BuildReserve()
        {
            Spaceship spaceship = UnitFactory.BuildUnitHMI(TypeEntite.ASTRONEF, null, _player.Joueur) as Spaceship;

            _unitList.AddUnit(spaceship);
        }