예제 #1
0
 public UIManager()
 {
     EditorForm     = new Form2();
     TileExplorer   = new Tiles.TilesExplorer();
     MapInformation = new MapInformations();
     LayersExplorer = new LayerExplorer();
     D2I            = new ShadowEmu.Common.GameData.D2I.D2iFile(AppDomain.CurrentDomain.BaseDirectory + @"\data\i18n\i18n_fr.d2i");
 }
예제 #2
0
 public RaidFight(GameFightJoinMessage msg, ConnectedHost host, MapInformations CurrentMap)
 {
     if (!(host.Bot.Game.World.Map.Data == null))
     {
         mHost = host;
     }
     Defenders           = new List <FighterModel>();
     Challengers         = new List <FighterModel>();
     JoinigInfos         = msg;
     FightType           = (FightTypeEnum)msg.fightType;
     CurrentMap.Updated += ActualizeMap;
     Challengers.Add(new FighterModel(playedFighter.PlayerBaseInformations.Id, (short)playedFighter.PlayerBaseInformations.CellId, TeamEnum.TEAM_CHALLENGER, this));
 }
예제 #3
0
        public void SetMap(MapInformations Map, bool useDiagonal)
        {
            currentMap = Map.CurrentMap;
            if (currentMap == null)
            {
                return;
            }
            useDiagonals = useDiagonal;
            matrix.Clear();
            openList.Clear();
            find = false;
            CellData cell;
            int      id   = 0;
            int      loc1 = 0;
            int      loc2 = 0;
            int      loc3 = 0;

            for (int line = 0; line < 20; line++)
            {
                for (int column = 0; column < 14; column++)
                {
                    cell = currentMap.Cells[id];
                    if (Map.Actors.ContainsKey((int)id))
                    {
                        cell.mov = false;
                    }
                    matrix.Add(id, new Cell(cell, cell.mapChangeData != 0, cell.mov, true, column, loc3, id, new Point(loc1 + column, loc2 + column)));
                    id++;
                }
                loc1++;
                loc3++;
                for (int column = 0; column < 14; column++)
                {
                    cell = currentMap.Cells[id];
                    if (Map.Actors.ContainsKey((int)id))
                    {
                        cell.mov = false;
                    }
                    matrix.Add(id, new Cell(cell, cell.mapChangeData != 0, cell.mov, true, column, loc3, id, new Point(loc1 + column, loc2 + column)));
                    id++;
                }
                loc3++;
                loc2--;
            }
        }
예제 #4
0
 public WorldControler(ConnectedHost host)
 {
     mHost         = host;
     Map           = new MapInformations(mHost);
     fightingFrame = new FightingFrame(mHost);
 }