コード例 #1
0
        public List <ModelInstance> AddObj(int id, Transform location)
        {
            var models = InterrootLoader.LoadModelObj(id);

            var returnedModelInstances = new List <ModelInstance>();

            for (int i = 0; i < models.Count; i++)
            {
                var m = new ModelInstance($"o{id:D4}{(i > 0 ? $"[{i + 1}]" : "")}", models[i], location, -1, -1, -1, -1);
                AddModelInstance(m);
                returnedModelInstances.Add(m);
            }

            GFX.ModelDrawer.RequestTextureLoad();

            return(returnedModelInstances);
        }
コード例 #2
0
        public List <Model> AddObj(int id, Transform location)
        {
            var models = InterrootLoader.LoadModelObj(id);

            var returnedModelInstances = new List <Model>();

            for (int i = 0; i < models.Count; i++)
            {
                if (InterrootLoader.Type == InterrootLoader.InterrootType.InterrootDS3)
                {
                    AddModelInstance(models[i], $"o{id:D6}{(i > 0 ? $"[{i + 1}]" : "")}", location);
                }
                else
                {
                    AddModelInstance(models[i], $"o{id:D4}{(i > 0 ? $"[{i + 1}]" : "")}", location);
                }

                returnedModelInstances.Add(models[i]);
            }

            GFX.ModelDrawer.RequestTextureLoad();

            return(returnedModelInstances);
        }