Beispiel #1
0
        private void objectFromTemplate()
        {
            PhysModel curModel = new PhysModel(Scene);

            curModel.Materials = template.materials;
            curModel.Meshes = template.meshes;
            curModel.Position = ghost.Position;
            curModel.PhysBoxes = template.pmeshes;

            curModel.IsStatic = template.isStatic;

            curModel.setName(Scene.getUniqueName());

            curModel.Orientation = ghost.Orientation;

            if (template.hasLight && Scene.lightCount < ShaderLoader.maxNoLights)
            {
                Light mLight = new LightSpot(curModel);
                mLight.Color = new Vector4(template.lightColor, 1);
            }
        }