Exemplo n.º 1
0
 public void LoadAlgorithmSettings()
 {
     FloorSettings.Clear();
     TileLayers.Clear();
     TileData.Clear();
     Items.Clear();
     Npcs.Clear();
     Rooms.Clear();
     if (Algorithm > -1)
     {
         FloorAlgorithm settingsGuide = GameData.FloorAlgorithmDex[Algorithm];
         for (int i = 0; i < settingsGuide.FloorSettings.Count; i++)
         {
             FloorSettings.Add(settingsGuide.FloorSettings[i].Item1, 0);
         }
         for (int i = 0; i < settingsGuide.LayerSettings.Count; i++)
         {
             TileLayers.Add(settingsGuide.LayerSettings[i], new List <Maps.TileAnim>());
         }
         for (int i = 0; i < settingsGuide.TileSettings.Count; i++)
         {
             TileData.Add(settingsGuide.TileSettings[i], new List <Maps.TileData>());
         }
         for (int i = 0; i < settingsGuide.ItemGroups.Count; i++)
         {
             Items.Add(settingsGuide.ItemGroups[i], new List <Tuple <ItemPreset, int> >());
         }
         for (int i = 0; i < settingsGuide.NpcGroups.Count; i++)
         {
             Npcs.Add(settingsGuide.NpcGroups[i], new List <Tuple <NpcPreset, int> >());
         }
         for (int i = 0; i < settingsGuide.RoomGroups.Count; i++)
         {
             Rooms.Add(settingsGuide.RoomGroups[i], new List <Tuple <int, int> >());
         }
     }
 }
Exemplo n.º 2
0
        public static void Init()
        {
#if GAME_MODE
            ItemDex = new ItemEntry[MAX_ITEMS];
            for (int i = 0; i < MAX_ITEMS; i++)
            {
                ItemDex[i] = new ItemEntry();
                ItemDex[i].Load(i);
            }

            MoveDex = new MoveEntry[MAX_MOVES];
            for (int i = 0; i < MAX_MOVES; i++)
            {
                MoveDex[i] = new MoveEntry();
                MoveDex[i].Load(i);
            }
#endif
            Dex = new DexEntry[MAX_DEX + 1];
            for (int i = 0; i <= MAX_DEX; i++)
            {
                try
                {
                    Dex[i] = new DexEntry();
                    Dex[i].Load(i);
                }
                catch (Exception ex)
                {
                    Logs.Logger.LogError(ex);
                }
            }

#if GAME_MODE
            RoomAlgorithmDex = new RoomAlgorithm[MAX_ROOM_ALGORITHMS];
            for (int i = 0; i < MAX_ROOM_ALGORITHMS; i++)
            {
                RoomAlgorithmDex[i] = new RoomAlgorithm();
                RoomAlgorithmDex[i].Load(i);
            }

            FloorAlgorithmDex = new FloorAlgorithm[MAX_FLOOR_ALGORITHMS];
            for (int i = 0; i < MAX_FLOOR_ALGORITHMS; i++)
            {
                FloorAlgorithmDex[i] = new FloorAlgorithm();
                FloorAlgorithmDex[i].Load(i);
            }

            DungeonAlgorithmDex = new AlgorithmEntry[MAX_DUNGEON_ALGORITHMS];
            for (int i = 0; i < MAX_DUNGEON_ALGORITHMS; i++)
            {
                DungeonAlgorithmDex[i] = new AlgorithmEntry();
                DungeonAlgorithmDex[i].Load(i);
            }

            RDungeonDex = new RDungeonEntry[MAX_RDUNGEONS];
            for (int i = 0; i < MAX_RDUNGEONS; i++)
            {
                RDungeonDex[i] = new RDungeonEntry();
                RDungeonDex[i].Load(i);
            }
#endif
        }
Exemplo n.º 3
0
        public static void Init()
        {
            #if GAME_MODE

            ItemDex = new ItemEntry[MAX_ITEMS];
            for (int i = 0; i < MAX_ITEMS; i++) {
                ItemDex[i] = new ItemEntry();
                ItemDex[i].Load(i);
            }

            MoveDex = new MoveEntry[MAX_MOVES];
            for (int i = 0; i < MAX_MOVES; i++) {
                MoveDex[i] = new MoveEntry();
                MoveDex[i].Load(i);
            }

            #endif
            Dex = new DexEntry[MAX_DEX+1];
            for (int i = 0; i <= MAX_DEX; i++)
            {
                try
                {
                    Dex[i] = new DexEntry();
                    Dex[i].Load(i);
                }
                catch (Exception ex)
                {
                    Logs.Logger.LogError(ex);
                }
            }

            #if GAME_MODE
            RoomAlgorithmDex = new RoomAlgorithm[MAX_ROOM_ALGORITHMS];
            for (int i = 0; i < MAX_ROOM_ALGORITHMS; i++) {
                RoomAlgorithmDex[i] = new RoomAlgorithm();
                RoomAlgorithmDex[i].Load(i);
            }

            FloorAlgorithmDex = new FloorAlgorithm[MAX_FLOOR_ALGORITHMS];
            for (int i = 0; i < MAX_FLOOR_ALGORITHMS; i++) {
                FloorAlgorithmDex[i] = new FloorAlgorithm();
                FloorAlgorithmDex[i].Load(i);
            }

            DungeonAlgorithmDex = new AlgorithmEntry[MAX_DUNGEON_ALGORITHMS];
            for (int i = 0; i < MAX_DUNGEON_ALGORITHMS; i++) {
                DungeonAlgorithmDex[i] = new AlgorithmEntry();
                DungeonAlgorithmDex[i].Load(i);
            }

            RDungeonDex = new RDungeonEntry[MAX_RDUNGEONS];
            for (int i = 0; i < MAX_RDUNGEONS; i++) {
                RDungeonDex[i] = new RDungeonEntry();
                RDungeonDex[i].Load(i);
            }
            #endif
        }