示例#1
0
        private void LoadObjectsSection(string section)
        {
            IList <dynamic> objs = LoadedByml[section]; // ObjectList works as well

            for (int i = 0; i < objs.Count; i++)
            {
                MapObject Tmp_mpobj = new Object.MapObject(objs[i]);
                int       ID        = int.Parse(Tmp_mpobj.objectID.Remove(0, 3));
                if (ID > LevelHighestId)
                {
                    LevelHighestId = ID;
                }

                LoadModelToObj(Tmp_mpobj);

                loadedMap.mobjs[section].Add(Tmp_mpobj);
            }
        }
示例#2
0
        private void LoadObjectsSection(string section)
        {
            IList <dynamic> objs = LoadedByml[section]; // ObjectList works as well

            for (int i = 0; i < objs.Count; i++)
            {
                MapObject Tmp_mpobj = new Object.MapObject(objs[i]);
                loadedMap.mobjs[section].Add(Tmp_mpobj);

                // Load the model
                if (Tmp_mpobj.modelName != null && !Tmp_mpobj.Equals(""))
                {
                    LoadModel(Tmp_mpobj.modelName);
                }
                else
                {
                    LoadModel(Tmp_mpobj.unitConfigName);
                }
            }
        }