Exemplo n.º 1
0
        void LoadContent()
        {
            TieModel          = Content.Load <Model>(ContentFolder3D + "TIE/TIE");
            XwingModel        = Content.Load <Model>(ContentFolder3D + "XWing/model");
            XwingEnginesModel = Content.Load <Model>(ContentFolder3D + "XWing/xwing-engines");


            TrenchPlatform     = loadNumberedModels("Trench/Platform/", 0, 3, 1);
            TrenchStraight     = loadNumberedModels("Trench/Straight/", 0, 1, 1);
            TrenchT            = loadNumberedModels("Trench/T/", 0, 1, 1);
            TrenchElbow        = loadNumberedModels("Trench/Elbow/", 0, 1, 1);
            TrenchIntersection = loadNumberedModels("Trench/Intersection/", 0, 1, 1);

            TrenchTurret = Content.Load <Model>(ContentFolder3D + "Trench/Trench-Turret");

            //Trench2 = Content.Load<Model>(ContentFolder3D + "Trench2/Trench");
            LaserModel = Content.Load <Model>(ContentFolder3D + "Laser/Laser");

            EffectBloom = Content.Load <Effect>(ContentFolderEffects + "Bloom");
            EffectBlur  = Content.Load <Effect>(ContentFolderEffects + "GaussianBlur");

            MasterMRT     = Content.Load <Effect>(ContentFolderEffects + "MasterMRT");
            XwingTextures = new Texture[] { Content.Load <Texture2D>(ContentFolderTextures + "xWing/lambert6_Base_Color"),
                                            Content.Load <Texture2D>(ContentFolderTextures + "xWing/lambert5_Base_Color") };
            XwingNormalTex = new Texture[] { Content.Load <Texture2D>(ContentFolderTextures + "xWing/lambert6_Normal_DirectX"),
                                             Content.Load <Texture2D>(ContentFolderTextures + "xWing/lambert5_Normal_DirectX") };

            TieTexture   = Content.Load <Texture2D>(ContentFolderTextures + "TIE/TIE_IN_Diff");
            TieNormalTex = Content.Load <Texture2D>(ContentFolderTextures + "TIE/TIE_IN_Normal");
            //TrenchTexture = Content.Load<Texture2D>(ContentFolderTextures + "Trench/MetalSurface");

            skyboxModel = Content.Load <Model>(ContentFolder3D + "skybox/cube");

            skyBoxTexture = Content.Load <TextureCube>(ContentFolderTextures + "/skybox/space_earth_small_skybox");

            SkyBox = new SkyBox(skyboxModel, skyBoxTexture, MasterMRT);

            assignEffectToModels(new Model[] { TieModel, XwingModel, XwingEnginesModel, TrenchTurret, LaserModel, SkyBox.Model }, MasterMRT);

            assignEffectToModels(TrenchElbow, MasterMRT);
            assignEffectToModels(TrenchIntersection, MasterMRT);
            assignEffectToModels(TrenchPlatform, MasterMRT);
            assignEffectToModels(TrenchStraight, MasterMRT);
            assignEffectToModels(TrenchT, MasterMRT);

            manageEffectParameters();

            InitRTs();
        }