示例#1
0
        void Setup()
        {
            Debug.Log("LightsOut: First Time Setup");

            EditorFacility facility = EditorDriver.editorFacility;
            EditorLevel    level    = 0;

            switch (facility)
            {
            case EditorFacility.SPH:
                // 0 = base, 0.5 = 1st, 1 = final
                level = (EditorLevel)(2 * ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.SpaceplaneHangar) + 1);
                break;

            case EditorFacility.VAB:
                // 0 = base, 0.5 = 1st, 1 = final
                level = (EditorLevel)(2 * ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.VehicleAssemblyBuilding) + 1);
                break;
            }

            Debug.Log("LightsOut: Entered " + facility + " " + level);

            // Set up ambient and shader managers
            GameObject[] gameObjects = FindObjectsOfType(typeof(GameObject)) as GameObject[];
            Camera[]     cameras     = FindObjectsOfType(typeof(Camera)) as Camera[];
            foreach (Camera camera in cameras)
            {
                if (camera.name == "sceneryCam")
                {
                    ambientManager = new LOAmbient(facility, level, gameObjects, camera, newLayer);
                }
            }
            shaderManager         = new LOShaders(facility, level, gameObjects);
            externalLightsManager = new LOExternalLights(facility, level);

            firstTime = false;
        }
示例#2
0
        void Setup()
        {
            //			Debug.Log("LightsOut: First Time Setup");

            EditorFacility facility = EditorDriver.editorFacility;
            EditorLevel level = 0;

            switch (facility) {
            case EditorFacility.SPH:
                // 0 = base, 0.5 = 1st, 1 = final
                level = (EditorLevel)(2 * ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.SpaceplaneHangar) + 1);
                break;

            case EditorFacility.VAB:
                // 0 = base, 0.5 = 1st, 1 = final
                level = (EditorLevel)(2 * ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.VehicleAssemblyBuilding) + 1);
                break;
            }

            //			Debug.Log("LightsOut: Entered " + facility + " " + level);

            // Set up ambient and shader managers
            GameObject[] gameObjects = FindObjectsOfType(typeof(GameObject)) as GameObject[];
            Camera[] cameras = FindObjectsOfType(typeof(Camera)) as Camera[];
            foreach (Camera camera in cameras) {
                if (camera.name == "sceneryCam") {
                    ambientManager = new LOAmbient(facility, level, gameObjects, camera, newLayer);
                }
            }
            shaderManager = new LOShaders(facility, level, gameObjects);
            externalLightsManager = new LOExternalLights(facility, level);

            firstTime = false;
        }