Exemplo n.º 1
0
        public static bool ShouldDisplayTutorial(LevelID lid)
        {
            if (lid.WorldIndex != 0)
            {
                return(false);
            }
            if (GetTutorialText(lid.LevelIndex) == String.Empty)
            {
                return(false);
            }
            if (PersistedWorldData.GetBestTimeForLevel(lid) != null)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        private static void LoadMenuBackdrop(SkyLevelDescription preloadedSky)
        {
            UnloadMenuBackdrop();

            if (!inDeferenceMode)
            {
                cameraLight = new Light(Vector3.ZERO, CAMERA_LIGHT_RADIUS, Vector3.ONE * CAMERA_LIGHT_INTENSITY);
                AssetLocator.LightPass.AddLight(cameraLight);
                //AssetLoader.ClearCache(); // TODO work out whether we really need this line?
                if (!Single.IsPositiveInfinity(Config.DofLensMaxBlurDist))
                {
                    AssetLocator.LightPass.SetLensProperties(DOF_FOCAL_DIST, DOF_MAX_DIST);
                }
                AssetLocator.MainCamera.Position         = Vector3.ZERO + Vector3.DOWN * BACKDROP_CAM_VERTICAL_OFFSET;
                AssetLocator.ShadowcasterCamera.Position = Vector3.UP * SILLY_BIT_DROP_HEIGHT * 1.1f;
                AssetLocator.ShadowcasterCamera.LookAt(Vector3.DOWN, Vector3.FORWARD);
                AssetLocator.ShadowcasterCamera.OrthographicDimensions = new Vector3(100f, 100f, PhysicsManager.ONE_METRE_SCALED * 3f);
                Quaternion downTilt = Quaternion.FromAxialRotation(Vector3.LEFT, BACKDROP_CAM_UPWARD_TILT);
                AssetLocator.MainCamera.Orient(Vector3.FORWARD * downTilt, Vector3.UP * downTilt);
                BGMManager.CrossFadeToTitleMusic();
                mainMenuSinceLoad = false;
            }

            if (preloadedSky != null)
            {
                loadedMenuBackdrop = preloadedSky;
            }
            else
            {
                int worldIndex = RandomProvider.Next(0, PersistedWorldData.GetFurthestUnlockedWorldIndex() + 1);
                loadedMenuBackdrop = (SkyLevelDescription)LevelDescription.Load(
                    Path.Combine(AssetLocator.LevelsDir, LevelDatabase.SkyboxFileNames[worldIndex])
                    );
                loadedMenuBackdrop.ReinitializeAll();
                worldIconTex.Texture = AssetLocator.WorldIcons[worldIndex];
            }
        }