Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="modelAtom"></param>
        /// <param name="entity"></param>
        /// <returns></returns>
        public ModelInstance AddModel(short modelAtom, Entity entity)
        {
            var modelName = world.Atoms[modelAtom];

            var modelDesc = world.Content.Load <ModelDescriptor>(@"models\" + modelName);

            var scene = world.Content.Load <Scene>(modelDesc.ScenePath);

            var model = new ModelInstance(this, modelDesc, scene, entity);

            AddModel(model);

            return(model);
        }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="modelInstance"></param>
 public void AddModel(ModelInstance modelInstance)
 {
     models.AddLast(modelInstance);
 }