public TacticsController(MainWindow window, string basePath)
 {
     mainwindow = window;
     tanks = new Tanks(basePath + "\\stamps\\tanks\\tanks.xml");
     icons = new Icons(basePath + "\\stamps\\icons\\icons.xml");
     maps = new Maps(basePath + "\\maps\\maps.xml", icons);
 }
        public AbstractTactic(Maps maps, Tanks tanks, Icons icons)
        {
            this.maps = maps;
            this.tanks = tanks;
            this.icons = icons;

            timer = true;
        }
Esempio n. 3
0
        public StaticTactic(Maps maps, Tanks tanks, Icons icons)
            : base(maps, tanks, icons)
        {
            staticTactics = new Dictionary<int, StaticMapEntry>();

            var source = new Uri(@"pack://application:,,,/Resources/clearTactics.png", UriKind.Absolute);
            clearTactic = new BitmapImage(source);
        }
Esempio n. 4
0
        public Tactic(Maps maps, Tanks tanks, Icons icons, string map_or_path)
        {
            this.maps = maps;
            this.tanks = tanks;
            this.icons = icons;

            int mapId;
            if (int.TryParse(map_or_path, out mapId)) {
                staticTactic = new StaticTactic(maps, tanks, icons);
                dynamicTactic = new DynamicTactic(maps, tanks, icons);
                staticTactic.setMap(map_or_path);
                dynamicTactic.setMap(map_or_path);

                this.map = maps.getMap(map_or_path);
            } else {
                load(map_or_path);
            }
        }
        public DynamicTactic(Maps maps, Tanks tanks, Icons icons)
            : base(maps, tanks, icons)
        {
            dynamicTanks = new List<DynamicTank>();
            staticIcons = new List<StaticIcon>();

            brush = new SolidColorBrush(Color.FromRgb(255, 0, 0));
            brush.Freeze();
            iconsSize = 50;

            ShowPlayerName = true;
            ShowTankName = false;
            TankIcon = DisplayTankIcon.tanktype;

            selectedStaticIcon = new List<StaticIcon>();
            selectedDynamicTank = new List<DynamicTank>();
            copyDynamicTank = new List<DynamicTank>();

            var source = new Uri(@"pack://application:,,,/Resources/clearTactics.png", UriKind.Absolute);
            clearTactic = new BitmapImage(source);
        }