示例#1
0
文件: Project.cs 项目: DJuttmann/SM3E
//----------------------------------------------------------------------------------------

        // Constructor.
        public Project()
        {
            Rooms          = new ListArray <Data> (AreaCount);
            DoorSets       = new List <Data> ();
            Doors          = new List <Data> ();
            ScrollSets     = new List <Data> ();
            PlmSets        = new List <Data> ();
            ScrollPlmDatas = new List <Data> ();
            Backgrounds    = new List <Data> ();
            Fxs            = new List <Data> ();
            SaveStations   = new List <Data> ();
            LevelDatas     = new List <Data> ();
            EnemySets      = new List <Data> ();
            EnemyGfxs      = new List <Data> ();
            ScrollAsms     = new List <Data> ();
            DoorAsms       = new List <Data> ();
            SetupAsms      = new List <Data> ();
            MainAsms       = new List <Data> ();
            TileSets       = new List <Data> ();
            TileTables     = new List <Data> ();
            TileSheets     = new List <Data> ();
            Palettes       = new List <Data> ();
            AreaMaps       = new List <Data> ();
            PlmTypes       = new List <PlmType> ();
            EnemyTypes     = new List <EnemyType> ();

            // Add data lists to the DataLists dictionary.
            DataLists = new Dictionary <string, IEnumerable <Data> > ();
            FieldInfo [] fields = typeof(Project).GetFields(BindingFlags.NonPublic |
                                                            BindingFlags.Instance);
            foreach (FieldInfo f in fields)
            {
                var attribute = f.GetCustomAttribute(typeof(RegisteredData)) as RegisteredData;
                if (attribute != null)
                {
                    DataLists.Add(attribute.Name, (IEnumerable <Data>)f.GetValue(this));
                }
            }

            // Load Resources.
            LoadBtsTiles();
        }
示例#2
0
 // Constructor
 public ListArrayEnumerator(ListArray <U> source)
 {
     Source = source;
 }
示例#3
0
 public void Dispose()
 {
     Source = null;
 }