Exemple #1
0
        private void AddStars()
        {
            Texture2D texture2D = this.CMProvider.Global.Load <Texture2D>("Other Textures/FullWhite");

            if (StarField.StarGeometry != null && !this.HasHorizontalTrails)
            {
                Group group = this.StarsMesh.AddGroup();
                group.Texture  = (Texture)texture2D;
                group.Geometry = StarField.StarGeometry;
            }
            else
            {
                Color[]   pointColors  = (Color[])null;
                Vector3[] pointPairs   = (Vector3[])null;
                float     num1         = 49f;
                float     num2         = num1;
                Vector3[] pointCenters = new Vector3[(int)((double)num2 * (double)num1 * (double)num2)];
                if (this.HasHorizontalTrails)
                {
                    pointColors = new Color[(int)((double)num2 * (double)num1 * (double)num2) * 2];
                    pointPairs  = new Vector3[(int)((double)num2 * (double)num1 * (double)num2) * 2];
                }
                Random random = RandomHelper.Random;
                int    num3   = 0;
                int    index1 = 0;
                for (int index2 = 0; (double)index2 < (double)num2; ++index2)
                {
                    for (int index3 = 0; (double)index3 < (double)num1; ++index3)
                    {
                        for (int index4 = 0; (double)index4 < (double)num2; ++index4)
                        {
                            Vector3 vector3 = new Vector3((float)(((double)index2 - (double)num2 / 2.0) * 100.0), (float)(((double)index3 - (double)num1 / 2.0) * 100.0), (float)(((double)index4 - (double)num2 / 2.0) * 100.0));
                            pointCenters[num3++] = vector3;
                            if (this.HasHorizontalTrails)
                            {
                                pointPairs[index1]     = vector3;
                                pointPairs[index1 + 1] = vector3;
                                byte num4 = (byte)random.Next(0, 256);
                                byte num5 = (byte)random.Next(0, 256);
                                pointColors[index1]     = new Color((int)num5, 0, (int)num4, 0);
                                pointColors[index1 + 1] = new Color((int)num5, 0, (int)num4, (int)byte.MaxValue);
                                index1 += 2;
                            }
                        }
                    }
                }
                Group group;
                StarField.AddPoints(group = this.StarsMesh.AddGroup(), pointCenters, (Texture)texture2D, 2f);
                StarField.StarGeometry    = group.Geometry;
                if (!this.HasHorizontalTrails)
                {
                    return;
                }
                this.TrailsMesh.AddLines(pointColors, pointPairs, true);
            }
        }
Exemple #2
0
        public override void Initialize()
        {
            base.Initialize();
            StarField starField1 = this;
            Mesh      mesh1      = new Mesh();

            mesh1.AlwaysOnTop = true;
            mesh1.DepthWrites = false;
            mesh1.Blending    = new BlendingMode?(BlendingMode.Additive);
            mesh1.Culling     = CullMode.None;
            Mesh      mesh2      = mesh1;
            StarField starField2 = this;
            FakePointSpritesEffect pointSpritesEffect1 = new FakePointSpritesEffect();

            pointSpritesEffect1.ForcedProjectionMatrix = new Matrix?(Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(75f), this.CameraManager.AspectRatio, 0.1f, 1000f));
            FakePointSpritesEffect pointSpritesEffect2;
            FakePointSpritesEffect pointSpritesEffect3 = pointSpritesEffect2 = pointSpritesEffect1;

            starField2.StarEffect = pointSpritesEffect2;
            FakePointSpritesEffect pointSpritesEffect4 = pointSpritesEffect3;

            mesh2.Effect = (BaseEffect)pointSpritesEffect4;
            Mesh mesh3 = mesh1;

            starField1.StarsMesh = mesh3;
            if (this.HasHorizontalTrails)
            {
                StarField starField3 = this;
                Mesh      mesh4      = new Mesh();
                mesh4.AlwaysOnTop = true;
                mesh4.DepthWrites = false;
                mesh4.Blending    = new BlendingMode?(BlendingMode.Additive);
                Mesh mesh5 = mesh4;
                HorizontalTrailsEffect horizontalTrailsEffect1 = new HorizontalTrailsEffect();
                horizontalTrailsEffect1.ForcedProjectionMatrix = this.StarEffect.ForcedProjectionMatrix;
                HorizontalTrailsEffect horizontalTrailsEffect2 = horizontalTrailsEffect1;
                mesh5.Effect = (BaseEffect)horizontalTrailsEffect2;
                Mesh mesh6 = mesh4;
                starField3.TrailsMesh = mesh6;
            }
            this.AddStars();
            if (this.FollowCamera)
            {
                return;
            }
            this.StarEffect.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitZ, Vector3.Up));
            if (!this.HasHorizontalTrails)
            {
                return;
            }
            (this.TrailsMesh.Effect as HorizontalTrailsEffect).ForcedViewMatrix = this.StarEffect.ForcedViewMatrix;
        }
Exemple #3
0
 public void Draw()
 {
     if (!this.FollowCamera)
     {
         this.StarsMesh.Position = this.AdditionalZoom * Vector3.Forward * 125f - 2400f * Vector3.Forward;
         this.StarsMesh.Scale    = new Vector3(1f + this.AdditionalScale, 1f + this.AdditionalScale, 1f);
     }
     else if (!this.GameState.InFpsMode)
     {
         FakePointSpritesEffect pointSpritesEffect = this.StarEffect;
         StarField starField1 = this;
         StarField starField2 = this;
         Matrix?   nullable1  = new Matrix?();
         Matrix?   nullable2  = nullable1;
         starField2.savedViewMatrix = nullable2;
         Matrix?nullable3;
         Matrix?nullable4 = nullable3 = nullable1;
         starField1.savedViewMatrix = nullable3;
         Matrix?nullable5 = nullable4;
         pointSpritesEffect.ForcedViewMatrix = nullable5;
         this.StarsMesh.Position             = this.CameraManager.InterpolatedCenter * 0.5f;
         this.StarsMesh.Scale = new Vector3((float)(112.5 / ((double)this.CameraManager.Radius / (double)SettingsManager.GetViewScale(this.GraphicsDevice) + 40.0)));
         if (this.HasHorizontalTrails)
         {
             this.TrailsMesh.Position = this.StarsMesh.Position;
             this.TrailsMesh.Scale    = this.StarsMesh.Scale = new Vector3((float)(65.0 / ((double)this.CameraManager.Radius / (double)SettingsManager.GetViewScale(this.GraphicsDevice) + 25.0)));
         }
     }
     else if (this.CameraManager.ProjectionTransition)
     {
         if (this.CameraManager.Viewpoint != Viewpoint.Perspective)
         {
             this.StarEffect.ForcedViewMatrix = new Matrix?(Matrix.Lerp(this.CameraManager.View, this.CameraManager.View, Easing.EaseOut((double)this.CameraManager.ViewTransitionStep, EasingType.Quadratic)));
         }
         else if (!this.savedViewMatrix.HasValue)
         {
             this.savedViewMatrix = new Matrix?(this.CameraManager.View);
         }
     }
     this.StarsMesh.Material.Opacity = this.Opacity;
     this.StarsMesh.Draw();
     if (!this.Enabled || !this.HasHorizontalTrails)
     {
         return;
     }
     this.TrailsMesh.Draw();
 }
Exemple #4
0
 protected override bool UpdateEarlyOut()
 {
     if (this.GameState.IsTrialMode)
     {
         if (this.StartedNewGame && this.selectorPhase != SelectorPhase.Disappear)
         {
             this.sinceSelectorPhaseStarted = 0.0f;
             this.selectorPhase             = SelectorPhase.Disappear;
         }
         if (this.StartedNewGame && !this.GameState.Loading)
         {
             this.DestroyMenu();
             PauseMenu.Starfield = (StarField)null;
             this.CMProvider.Dispose(CM.Intro);
             return(true);
         }
     }
     else
     {
         if (this.StartedNewGame && this.IntroZoomIn == null && (PauseMenu.Starfield != null && PauseMenu.Starfield.IsDisposed))
         {
             PauseMenu.Starfield = (StarField)null;
             ServiceHelper.AddComponent((IGameComponent)(this.IntroZoomIn = new IntroZoomIn(this.Game)));
         }
         if (this.StartedNewGame && this.IntroZoomIn != null && this.IntroZoomIn.IsDisposed)
         {
             this.IntroZoomIn = (IntroZoomIn)null;
             this.CMProvider.Dispose(CM.Intro);
             ServiceHelper.RemoveComponent <PauseMenu>(this);
             return(true);
         }
     }
     if ((this.nextMenuLevel ?? this.CurrentMenuLevel) == null)
     {
         this.DestroyMenu();
         return(true);
     }
     else
     {
         return(this.StartedNewGame);
     }
 }
Exemple #5
0
 protected override void PostInitialize()
 {
   if (PauseMenu.Starfield == null)
     ServiceHelper.AddComponent((IGameComponent) (PauseMenu.Starfield = new StarField(this.Game)));
   MenuLevel menuLevel1 = this.MenuRoot;
   int num1 = 0;
   string text1 = "ResumeGame";
   Action onSelect1 = new Action(((MenuBase) this).ResumeGame);
   int at1 = num1;
   menuLevel1.AddItem(text1, onSelect1, at1);
   MenuLevel menuLevel2 = this.MenuRoot;
   int num2 = 1;
   string text2 = "StartNewGame";
   Action onSelect2 = (Action) (() => this.ChangeMenuLevel(this.StartNewGameMenu, false));
   int at2 = num2;
   menuLevel2.AddItem(text2, onSelect2, at2);
   this.wasStrict = this.InputManager.StrictRotation;
   this.InputManager.StrictRotation = false;
   this.GameState.SaveToCloud(false);
 }
Exemple #6
0
        protected override void PostInitialize()
        {
            if (PauseMenu.Starfield == null)
            {
                ServiceHelper.AddComponent((IGameComponent)(PauseMenu.Starfield = new StarField(this.Game)));
            }
            MenuLevel menuLevel1 = this.MenuRoot;
            int       num1       = 0;
            string    text1      = "ResumeGame";
            Action    onSelect1  = new Action(((MenuBase)this).ResumeGame);
            int       at1        = num1;

            menuLevel1.AddItem(text1, onSelect1, at1);
            MenuLevel menuLevel2 = this.MenuRoot;
            int       num2       = 1;
            string    text2      = "StartNewGame";
            Action    onSelect2  = (Action)(() => this.ChangeMenuLevel(this.StartNewGameMenu, false));
            int       at2        = num2;

            menuLevel2.AddItem(text2, onSelect2, at2);
            this.wasStrict = this.InputManager.StrictRotation;
            this.InputManager.StrictRotation = false;
            this.GameState.SaveToCloud(false);
        }
Exemple #7
0
        public override void Initialize()
        {
            base.Initialize();
            this.LogoMesh = new Mesh()
            {
                AlwaysOnTop = true,
                DepthWrites = false,
                Blending    = new BlendingMode?(BlendingMode.Alphablending),
                Effect      = (BaseEffect)(this.FezEffect = (DefaultEffect) new DefaultEffect.VertexColored())
            };
            this.WireMesh = new Mesh()
            {
                DepthWrites = false,
                AlwaysOnTop = true,
                Effect      = this.LogoMesh.Effect
            };
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 2f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(1f, 2f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(1f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(2f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(2f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 2f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 2f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(2f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 0.0f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 1f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 2f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 3f, 0.0f), Color.Black, false);
            this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 3f, 0.0f), Color.Black, false);
            Group group1 = this.WireMesh.AddGroup();
            IndexedUserPrimitives <FezVertexPositionColor> indexedUserPrimitives1 = new IndexedUserPrimitives <FezVertexPositionColor>(PrimitiveType.LineList);

            group1.Geometry = (IIndexedPrimitiveCollection)indexedUserPrimitives1;
            indexedUserPrimitives1.Vertices = new FezVertexPositionColor[16]
            {
                new FezVertexPositionColor(new Vector3(0.0f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(1f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(1f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(2f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(2f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(3f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(3f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(0.0f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(0.0f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(1f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(1f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(2f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(2f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(3f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(3f, 4f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(0.0f, 4f, 1f), Color.White)
            };
            indexedUserPrimitives1.Indices = new int[50]
            {
                0,
                1,
                1,
                2,
                2,
                3,
                3,
                4,
                4,
                5,
                5,
                6,
                6,
                7,
                7,
                0,
                8,
                9,
                9,
                10,
                10,
                11,
                11,
                12,
                12,
                13,
                13,
                14,
                14,
                15,
                15,
                8,
                0,
                8,
                1,
                9,
                2,
                10,
                3,
                11,
                4,
                12,
                5,
                13,
                6,
                14,
                7,
                15,
                0,
                8
            };
            Group group2 = this.WireMesh.AddGroup();
            IndexedUserPrimitives <FezVertexPositionColor> indexedUserPrimitives2 = new IndexedUserPrimitives <FezVertexPositionColor>(PrimitiveType.LineList);

            group2.Geometry = (IIndexedPrimitiveCollection)indexedUserPrimitives2;
            indexedUserPrimitives2.Vertices = new FezVertexPositionColor[20]
            {
                new FezVertexPositionColor(new Vector3(4f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 1f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(5f, 1f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(5f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(6f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(6f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(4f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(4f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 1f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(5f, 1f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(5f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(6f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(6f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(7f, 4f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(4f, 4f, 1f), Color.White)
            };
            indexedUserPrimitives2.Indices = new int[60]
            {
                0,
                1,
                1,
                2,
                2,
                3,
                3,
                4,
                4,
                5,
                5,
                6,
                6,
                7,
                7,
                8,
                8,
                9,
                9,
                0,
                10,
                11,
                11,
                12,
                12,
                13,
                13,
                14,
                14,
                15,
                15,
                16,
                16,
                17,
                17,
                18,
                18,
                19,
                19,
                10,
                0,
                10,
                1,
                11,
                2,
                12,
                3,
                13,
                4,
                14,
                5,
                15,
                6,
                16,
                7,
                17,
                8,
                18,
                9,
                19
            };
            Group group3 = this.WireMesh.AddGroup();
            IndexedUserPrimitives <FezVertexPositionColor> indexedUserPrimitives3 = new IndexedUserPrimitives <FezVertexPositionColor>(PrimitiveType.LineList);

            group3.Geometry = (IIndexedPrimitiveCollection)indexedUserPrimitives3;
            indexedUserPrimitives3.Vertices = new FezVertexPositionColor[22]
            {
                new FezVertexPositionColor(new Vector3(8f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 0.0f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 1f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 1f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 4f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 3f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 2f, 0.0f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 0.0f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 1f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 1f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 2f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(11f, 4f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 4f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(10f, 3f, 1f), Color.White),
                new FezVertexPositionColor(new Vector3(8f, 2f, 1f), Color.White)
            };
            indexedUserPrimitives3.Indices = new int[70]
            {
                0,
                1,
                1,
                2,
                2,
                3,
                3,
                4,
                4,
                5,
                5,
                6,
                6,
                7,
                7,
                8,
                8,
                9,
                9,
                4,
                4,
                10,
                10,
                0,
                11,
                12,
                12,
                13,
                13,
                14,
                14,
                15,
                15,
                16,
                16,
                17,
                17,
                18,
                18,
                19,
                19,
                20,
                20,
                15,
                15,
                21,
                21,
                11,
                0,
                11,
                1,
                12,
                2,
                13,
                3,
                14,
                4,
                15,
                5,
                16,
                6,
                17,
                7,
                18,
                8,
                19,
                9,
                20,
                10,
                21
            };
            this.WireMesh.Position = this.LogoMesh.Position = new Vector3(-5.5f, -2f, -0.5f);
            this.WireMesh.BakeTransform <FezVertexPositionColor>();
            this.LogoMesh.BakeTransform <FezVertexPositionColor>();
            ContentManager contentManager = this.CMProvider.Get(CM.Menu);

            this.sGlitch1 = contentManager.Load <SoundEffect>("Sounds/Intro/FezLogoGlitch1");
            this.sGlitch2 = contentManager.Load <SoundEffect>("Sounds/Intro/FezLogoGlitch2");
            this.sGlitch3 = contentManager.Load <SoundEffect>("Sounds/Intro/FezLogoGlitch3");
            ServiceHelper.AddComponent((IGameComponent)(this.Starfield = new StarField(this.Game)));
            this.Starfield.Opacity         = 0.0f;
            this.LogoMesh.Material.Opacity = 0.0f;
            this.untilGlitch = RandomHelper.Between(1.0 / 3.0, 1.0);
        }
Exemple #8
0
 public static void PreInitialize()
 {
   ServiceHelper.AddComponent((IGameComponent) (PauseMenu.Starfield = new StarField(ServiceHelper.Game)));
 }
Exemple #9
0
 protected override bool UpdateEarlyOut()
 {
   if (this.GameState.IsTrialMode)
   {
     if (this.StartedNewGame && this.selectorPhase != SelectorPhase.Disappear)
     {
       this.sinceSelectorPhaseStarted = 0.0f;
       this.selectorPhase = SelectorPhase.Disappear;
     }
     if (this.StartedNewGame && !this.GameState.Loading)
     {
       this.DestroyMenu();
       PauseMenu.Starfield = (StarField) null;
       this.CMProvider.Dispose(CM.Intro);
       return true;
     }
   }
   else
   {
     if (this.StartedNewGame && this.IntroZoomIn == null && (PauseMenu.Starfield != null && PauseMenu.Starfield.IsDisposed))
     {
       PauseMenu.Starfield = (StarField) null;
       ServiceHelper.AddComponent((IGameComponent) (this.IntroZoomIn = new IntroZoomIn(this.Game)));
     }
     if (this.StartedNewGame && this.IntroZoomIn != null && this.IntroZoomIn.IsDisposed)
     {
       this.IntroZoomIn = (IntroZoomIn) null;
       this.CMProvider.Dispose(CM.Intro);
       ServiceHelper.RemoveComponent<PauseMenu>(this);
       return true;
     }
   }
   if ((this.nextMenuLevel ?? this.CurrentMenuLevel) == null)
   {
     this.DestroyMenu();
     return true;
   }
   else
     return this.StartedNewGame;
 }
Exemple #10
0
 public static void PreInitialize()
 {
     ServiceHelper.AddComponent((IGameComponent)(PauseMenu.Starfield = new StarField(ServiceHelper.Game)));
 }
Exemple #11
0
 private void UpdateLogo()
 {
   double totalSeconds = this.phaseTime.TotalSeconds;
   switch (this.screen)
   {
     case Intro.Screen.ESRB_PEGI:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           this.opacity = 1f;
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 4.0)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.opacity = 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine);
           return;
         default:
           return;
       }
     case Intro.Screen.XBLA:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.125)
             this.ChangePhase();
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds * 8.0), EasingType.Sine);
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 2.0)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.opacity = 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine);
           return;
         default:
           return;
       }
     case Intro.Screen.MGS:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.125)
             this.ChangePhase();
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds * 8.0), EasingType.Sine);
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 2.0)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.opacity = Math.Min(this.opacity, 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine));
           return;
         default:
           return;
       }
     case Intro.Screen.WhiteScreen:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.125)
             this.ChangePhase();
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds * 8.0), EasingType.Sine);
           return;
         case Intro.Phase.Wait:
           if (!Intro.PreloadStarted)
           {
             this.GameState.SkipLoadScreen = true;
             this.GameState.Loading = true;
             Worker<bool> worker = this.ThreadPool.Take<bool>(new Action<bool>(this.DoPreLoad));
             worker.Priority = ThreadPriority.AboveNormal;
             worker.Finished += (Action) (() =>
             {
               this.ThreadPool.Return<bool>(worker);
               this.GameState.ScheduleLoadEnd = true;
               this.GameState.SkipLoadScreen = false;
             });
             worker.Start(false);
             Intro.PreloadStarted = true;
           }
           if (!Intro.PreloadComplete)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.opacity = Math.Min(this.opacity, 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine));
           return;
         default:
           return;
       }
     case Intro.Screen.Polytron:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 1.5)
             this.ChangePhase();
           this.opacity = 0.0f;
           this.PolytronLogo.Opacity = 1f;
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 1.5)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.PolytronLogo.Opacity = 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine);
           return;
         default:
           return;
       }
     case Intro.Screen.Trapdoor:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.125)
             this.ChangePhase();
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds * 8.0), EasingType.Sine);
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 1.5)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.25)
             this.ChangePhase();
           this.opacity = Math.Min(this.opacity, 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 4.0), EasingType.Sine));
           return;
         default:
           return;
       }
     case Intro.Screen.TrixelEngine:
       float num = 0.0f;
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (this.sTrixelIn != null)
           {
             SoundEffectExtensions.Emit(this.sTrixelIn);
             this.sTrixelIn = (SoundEffect) null;
           }
           if (totalSeconds >= 1.0)
             this.ChangePhase();
           num = (float) ((1.0 - (double) Easing.EaseOut(FezMath.Saturate(totalSeconds), EasingType.Quadratic)) * 6.0);
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds * 2.0 - 0.5), EasingType.Quadratic);
           break;
         case Intro.Phase.Wait:
           if (totalSeconds >= 1.0)
           {
             this.ChangePhase();
             break;
           }
           else
             break;
         case Intro.Phase.FadeOut:
           if (this.sTrixelOut != null)
           {
             SoundEffectExtensions.Emit(this.sTrixelOut);
             this.sTrixelOut = (SoundEffect) null;
           }
           if (totalSeconds >= 0.5)
             this.ChangePhase();
           this.opacity = Math.Min(this.opacity, 1f - Easing.EaseIn(FezMath.Saturate(totalSeconds * 2.0), EasingType.Quadratic));
           num = Easing.EaseIn(FezMath.Saturate(totalSeconds * 2.0), EasingType.Quadratic) * -4f;
           break;
       }
       this.TrixelPlanes.Groups[0].Position = Vector3.Right * (0.5f + num);
       this.TrixelPlanes.Groups[1].Position = Vector3.Up * (0.5f + num);
       this.TrixelPlanes.Groups[2].Position = Vector3.Backward * num;
       break;
     case Intro.Screen.SaveIndicator:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           this.eDrone.VolumeFactor = FezMath.Saturate((float) totalSeconds / 0.125f);
           this.opacity = Easing.EaseIn(FezMath.Saturate(totalSeconds / 0.125), EasingType.Sine);
           if (totalSeconds < 0.125)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           if (totalSeconds < 2.625)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           this.opacity = Math.Min(this.opacity, 1f - Easing.EaseOut(FezMath.Saturate(totalSeconds / 0.25), EasingType.Sine));
           this.eDrone.VolumeFactor = (float) (1.0 - (double) FezMath.Saturate((float) totalSeconds / 0.25f) * 0.5);
           if (totalSeconds < 0.25)
             return;
           this.ChangePhase();
           return;
         default:
           return;
       }
     case Intro.Screen.Fez:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.75)
             this.ChangePhase();
           this.opacity = Easing.EaseInOut(FezMath.Saturate(totalSeconds / 0.75), EasingType.Sine);
           this.promptOpacity = Easing.EaseIn(FezMath.Saturate((totalSeconds - 0.25) / 0.5), EasingType.Sine);
           return;
         case Intro.Phase.Wait:
           this.opacity = this.promptOpacity = 1f;
           if (this.InputManager.Jump != FezButtonState.Pressed && this.InputManager.Start != FezButtonState.Pressed)
             return;
           if (!this.Fake)
             this.InputManager.DetermineActiveController();
           this.SoundManager.PlayNewSong((string) null, 0.0f);
           this.FezLogo.TransitionStarted = true;
           SoundEffectExtensions.Emit(this.sTitleBassHit).Persistent = true;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           this.promptOpacity = this.opacity = 1f - Easing.EaseOut(FezMath.Saturate(totalSeconds / 1.0), EasingType.Sine);
           if (totalSeconds < 1.0)
             return;
           this.ChangePhase();
           return;
         default:
           return;
       }
     case Intro.Screen.SellScreen:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           this.GameState.SkipRendering = true;
           this.opacity = Easing.EaseInOut(FezMath.Saturate(totalSeconds - 14.0), EasingType.Sine);
           if (totalSeconds < 15.0)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           this.FezLogo.LogoTextureXFade = 1f - Easing.EaseIn((double) FezMath.Saturate((float) ((totalSeconds - 76.0) / 4.0)), EasingType.Sine);
           if (this.InputManager.Jump == FezButtonState.Pressed || this.InputManager.Start == FezButtonState.Pressed)
           {
             if (Fez.PublicDemo)
             {
               this.GameState.Restart();
               return;
             }
             else
             {
               SoundEffectExtensions.Emit(this.sExitGame);
               this.GameState.ReturnToArcade();
               this.Enabled = false;
               return;
             }
           }
           else if (!Fez.PublicDemo && (this.InputManager.CancelTalk == FezButtonState.Pressed || this.InputManager.Back == FezButtonState.Pressed))
           {
             this.GameState.SkipRendering = false;
             this.FezLogo.Inverted = false;
             if (!this.FadeBackToGame)
             {
               SoundEffectExtensions.Emit(this.sTitleBassHit);
             }
             else
             {
               this.SoundManager.PlayNewSong((string) null, 0.5f);
               this.SoundManager.UnshelfSong();
               this.SoundManager.Resume();
               this.SoundManager.UnmuteAmbienceTracks(true);
               this.scheduledBackToGame = true;
               this.FezLogo.DoubleTime = true;
               this.PlayerManager.Hidden = true;
               this.GameState.InCutscene = false;
               this.GameState.ForceTimePaused = false;
             }
             this.ChangePhase();
             return;
           }
           else
           {
             if (Fez.PublicDemo || this.InputManager.GrabThrow != FezButtonState.Pressed)
               return;
             SoundEffectExtensions.Emit(this.sConfirm);
             Guide.SimulateTrialMode = false;
             return;
           }
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 2.0)
           {
             if (this.scheduledBackToGame)
             {
               this.PlayerManager.Hidden = false;
               this.PlayerManager.Ground = new MultipleHits<TrileInstance>();
               this.PlayerManager.Velocity = (float) (3.15000009536743 * (double) Math.Sign(this.CollisionManager.GravityFactor) * 0.150000005960464 * 0.0166666675359011) * -Vector3.UnitY;
               this.PhysicsManager.Update((IComplexPhysicsEntity) this.PlayerManager);
               this.PlayerManager.Velocity = (float) (3.15000009536743 * (double) Math.Sign(this.CollisionManager.GravityFactor) * 0.150000005960464 * 0.0166666675359011) * -Vector3.UnitY;
               this.PlayerManager.Action = ActionType.ExitDoor;
               ServiceHelper.RemoveComponent<Intro>(this);
             }
             else
               this.ChangePhase();
           }
           this.opacity = 1f - Easing.EaseInOut(FezMath.Saturate(totalSeconds / 2.0), EasingType.Sine);
           return;
         default:
           return;
       }
     case Intro.Screen.Zoom:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           if (!this.FezLogo.IsFullscreen)
             return;
           Intro.Starfield = this.FezLogo.Starfield;
           ServiceHelper.RemoveComponent<FezLogo>(this.FezLogo);
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           this.ChangePhase();
           return;
         default:
           return;
       }
     case Intro.Screen.SignOutPrompt:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (totalSeconds >= 0.5)
             this.ChangePhase();
           this.opacity = FezMath.Saturate((float) totalSeconds * 2f);
           return;
         case Intro.Phase.Wait:
           if (this.InputManager.Jump != FezButtonState.Pressed && this.InputManager.Start != FezButtonState.Pressed)
             return;
           this.InputManager.DetermineActiveController();
           this.FezLogo.TransitionStarted = true;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (totalSeconds >= 0.5)
             this.ChangePhase();
           this.opacity = 1f - FezMath.Saturate((float) totalSeconds * 2f);
           return;
         default:
           return;
       }
     case Intro.Screen.SignInChooseDevice:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (this.Fake)
             this.ChangePhase();
           else
             this.GameState.SignInAndChooseStorage(new Action(this.ChangePhase));
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           return;
         case Intro.Phase.FadeOut:
           this.ChangePhase();
           return;
         default:
           return;
       }
     case Intro.Screen.MainMenu:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           this.GameState.ForcedSignOut = false;
           if (!this.Fake)
           {
             if (!this.GameState.SaveData.HasNewGamePlus || this.GameState.SaveData.Level != null)
             {
               this.GameState.LoadSaveFile((Action) (() => Waiters.Wait(0.0, (Action) (() =>
               {
                 this.Enabled = true;
                 ServiceHelper.AddComponent((IGameComponent) (this.MainMenu = new MainMenu(this.Game)));
                 this.ChangePhase();
               }))));
               this.Enabled = false;
               return;
             }
             else
             {
               ServiceHelper.AddComponent((IGameComponent) (this.MainMenu = new MainMenu(this.Game)));
               this.ChangePhase();
               return;
             }
           }
           else
           {
             this.ChangePhase();
             return;
           }
         case Intro.Phase.Wait:
           if (this.Fake || this.MainMenu.StartedGame)
           {
             this.ZoomToHouse = true;
             Intro.Starfield.Enabled = true;
             SoundEffectExtensions.Emit(this.sStarZoom).Persistent = true;
             this.StartLoading();
             this.ChangePhase();
             return;
           }
           else if (this.MainMenu.HasBought)
           {
             this.GameState.ClearSaveFile();
             this.screen = Intro.Screen.SignInChooseDevice;
             this.phase = Intro.Phase.FadeIn;
             return;
           }
           else if (this.MainMenu.SellingTime)
           {
             this.GameService.EndTrial(true);
             ServiceHelper.RemoveComponent<MainMenu>(this.MainMenu);
             this.MainMenu = (MainMenu) null;
             this.Enabled = false;
             return;
           }
           else
           {
             if (!this.MainMenu.ContinuedGame)
               return;
             this.StartLoading();
             this.ChangePhase();
             return;
           }
         case Intro.Phase.FadeOut:
           this.ChangePhase();
           return;
         default:
           return;
       }
     case Intro.Screen.Warp:
       switch (this.phase)
       {
         case Intro.Phase.FadeIn:
           if (this.GameState.Loading)
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.Wait:
           if (this.GameState.IsTrialMode)
           {
             ServiceHelper.AddComponent((IGameComponent) new TileTransition(ServiceHelper.Game)
             {
               ScreenCaptured = (Action) (() =>
               {
                 ServiceHelper.RemoveComponent<Intro>(this);
                 this.GameState.InCutscene = false;
                 this.GameState.ForceTimePaused = false;
               })
             });
             this.ChangePhase();
           }
           if (this.ZoomToHouse && Intro.Starfield != null && (Intro.Starfield.IsDisposed && this.IntroZoomIn == null))
             ServiceHelper.AddComponent((IGameComponent) (this.IntroZoomIn = new IntroZoomIn(this.Game)));
           if (this.ZoomToHouse && this.IntroZoomIn != null && this.IntroZoomIn.IsDisposed)
           {
             this.IntroZoomIn = (IntroZoomIn) null;
             this.GameState.SaveData.CanNewGamePlus = false;
             Logger.Log("Intro", "Intro is done and game is go!");
             ServiceHelper.RemoveComponent<Intro>(this);
           }
           if (this.GameState.IsTrialMode || this.ZoomToHouse || (this.IntroPanDown == null || this.IntroPanDown.DoPanDown))
             return;
           this.ChangePhase();
           return;
         case Intro.Phase.FadeOut:
           if (this.GameState.IsTrialMode || this.IntroPanDown != null && !this.IntroPanDown.IsDisposed)
             return;
           this.IntroPanDown = (IntroPanDown) null;
           Logger.Log("Intro", "Intro is done and game is go!");
           ServiceHelper.RemoveComponent<Intro>(this);
           return;
         default:
           return;
       }
   }
 }
Exemple #12
0
 protected override void Dispose(bool disposing)
 {
   if (this.CMProvider != null)
   {
     this.CMProvider.Dispose(CM.Intro);
     this.GameState.DynamicUpgrade -= new Action(this.Kill);
     Intro.Instance = (Intro) null;
     if (this.FezLogo != null)
       ServiceHelper.RemoveComponent<FezLogo>(this.FezLogo);
     if (this.PolytronLogo != null)
     {
       ServiceHelper.RemoveComponent<PolytronLogo>(this.PolytronLogo);
       this.PolytronLogo = (PolytronLogo) null;
     }
     if (this.IntroPanDown != null && !this.IntroPanDown.IsDisposed)
       ServiceHelper.RemoveComponent<IntroPanDown>(this.IntroPanDown);
     if (this.IntroZoomIn != null && !this.IntroZoomIn.IsDisposed)
       ServiceHelper.RemoveComponent<IntroZoomIn>(this.IntroZoomIn);
   }
   if (Intro.Starfield != null && Intro.Starfield.IsDisposed)
     Intro.Starfield = (StarField) null;
   this.TrixelPlanes.Dispose();
   this.TrialMesh.Dispose();
   if (this.SaveIndicatorMesh != null)
     this.SaveIndicatorMesh.Dispose();
   base.Dispose(disposing);
 }
Exemple #13
0
 protected override void LoadContent()
 {
   ContentManager contentManager = this.CMProvider.Get(CM.Intro);
   StaticText.GetString("Loading");
   bool flag = (double) SettingsManager.GetViewScale(this.GraphicsDevice) >= 1.5;
   this.TrixelEngineText = contentManager.Load<Texture2D>("Other Textures/splash/trixels" + (flag ? "_1440" : ""));
   this.TrapdoorLogo = contentManager.Load<Texture2D>("Other Textures/splash/trapdoor");
   this.spriteBatch = new SpriteBatch(this.GraphicsDevice);
   this.tr = new GlyphTextRenderer(this.Game);
   this.TrixelPlanes.Position = (Vector3.Right + Vector3.Up) * -0.125f - Vector3.Up * 0.25f;
   this.TrixelPlanes.Scale = new Vector3(0.75f);
   this.TrixelPlanes.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Back, Color.Magenta, true, false);
   this.TrixelPlanes.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Top, Color.Yellow, true, false);
   this.TrixelPlanes.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Left, Color.Cyan, true, false);
   SettingsManager.SetupViewport(this.GraphicsDevice, false);
   float aspectRatio1 = this.GraphicsDevice.Viewport.AspectRatio;
   Mesh mesh1 = this.TrixelPlanes;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic(2f * aspectRatio1, 2f, 0.1f, 100f));
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.UnitY - Vector3.UnitZ - Vector3.UnitX, Vector3.Zero, Vector3.Up));
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh1.Effect = (BaseEffect) vertexColored2;
   Intro intro1 = this;
   Mesh mesh2 = new Mesh();
   mesh2.AlwaysOnTop = true;
   mesh2.DepthWrites = false;
   Mesh mesh3 = mesh2;
   DefaultEffect.VertexColored vertexColored3 = new DefaultEffect.VertexColored();
   vertexColored3.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic(5f * aspectRatio1, 5f, 0.1f, 100f));
   vertexColored3.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.UnitY - Vector3.UnitZ - Vector3.UnitX, Vector3.Zero, Vector3.Up));
   DefaultEffect.VertexColored vertexColored4 = vertexColored3;
   mesh3.Effect = (BaseEffect) vertexColored4;
   Mesh mesh4 = mesh2;
   intro1.TrialMesh = mesh4;
   this.TrialMesh.AddColoredBox(Vector3.One, Vector3.Zero, new Color(209, 0, 55), true);
   ServiceHelper.AddComponent((IGameComponent) (this.PolytronLogo = new PolytronLogo(this.Game)));
   this.screen = Intro.Screen.WhiteScreen;
   Intro.FirstBootComplete = true;
   if (this.Restarted && !this.FullLogos)
     this.screen = Intro.Screen.Fez;
   if (this.GameState.ForcedSignOut)
   {
     this.InputManager.ClearActiveController();
     this.screen = Intro.Screen.SignInChooseDevice;
     ServiceHelper.AddComponent((IGameComponent) (Intro.Starfield = new StarField(this.Game)));
   }
   if (this.GameState.LoggedOutPlayerTag != null)
   {
     this.InputManager.ClearActiveController();
     this.screen = Intro.Screen.SignOutPrompt;
     ServiceHelper.AddComponent((IGameComponent) (Intro.Starfield = new StarField(this.Game)));
   }
   if (Fez.SkipLogos)
     this.screen = Intro.Screen.Fez;
   if (this.Fake)
   {
     this.screen = Intro.Screen.Polytron;
     this.PolytronLogo.Enabled = true;
   }
   if (this.Sell)
   {
     this.SoundManager.MuteAmbienceTracks();
     this.SoundManager.PlayNewSong("GOMEZ", 0.1f);
     this.screen = Intro.Screen.SellScreen;
   }
   this.GameState.ForceTimePaused = true;
   this.GameState.InCutscene = true;
   this.phaseTime = TimeSpan.FromSeconds(-0.600000023841858);
   this.sTitleBassHit = contentManager.Load<SoundEffect>("Sounds/Intro/LogoZoom");
   this.sTrixelIn = contentManager.Load<SoundEffect>("Sounds/Intro/TrixelLogoIn");
   this.sTrixelOut = contentManager.Load<SoundEffect>("Sounds/Intro/TrixelLogoOut");
   this.sExitGame = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/ExitGame");
   this.sConfirm = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/Confirm");
   this.sDrone = contentManager.Load<SoundEffect>("Sounds/Intro/FezLogoDrone");
   this.sStarZoom = contentManager.Load<SoundEffect>("Sounds/Intro/StarZoom");
   ServiceHelper.AddComponent((IGameComponent) (this.FezLogo = new FezLogo(this.Game)
   {
     Glitched = this.Glitch
   }));
   if (this.Sell)
   {
     this.FezLogo.Inverted = true;
     this.FezLogo.TransitionStarted = true;
     this.FezLogo.LogoTextureXFade = 1f;
     this.FezLogo.Opacity = 1f;
     Intro.Starfield = this.FezLogo.Starfield;
     this.Enabled = this.Visible = false;
   }
   if (Intro.HasShownSaveIndicator)
     return;
   float aspectRatio2 = this.GraphicsDevice.Viewport.AspectRatio;
   Intro intro2 = this;
   Mesh mesh5 = new Mesh();
   Mesh mesh6 = mesh5;
   DefaultEffect.VertexColored vertexColored5 = new DefaultEffect.VertexColored();
   vertexColored5.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic(14f * aspectRatio2, 14f, 0.1f, 100f));
   vertexColored5.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(new Vector3(0.0f, 0.0f, 10f), Vector3.Zero, Vector3.Up));
   DefaultEffect.VertexColored vertexColored6 = vertexColored5;
   mesh6.Effect = (BaseEffect) vertexColored6;
   mesh5.Blending = new BlendingMode?(BlendingMode.Alphablending);
   mesh5.AlwaysOnTop = true;
   mesh5.DepthWrites = false;
   Mesh mesh7 = mesh5;
   intro2.SaveIndicatorMesh = mesh7;
   this.SaveIndicatorMesh.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, Color.Red, true);
 }
Exemple #14
0
 public override void Initialize()
 {
   base.Initialize();
   ServiceHelper.AddComponent((IGameComponent) (this.Starfield = new StarField(this.Game)
   {
     Opacity = 0.0f,
     HasHorizontalTrails = true,
     FollowCamera = true
   }));
   ServiceHelper.AddComponent((IGameComponent) (this.SfRenderer = new EldersHexahedron.StarfieldRenderer(this.Game, this)));
   this.StatuePlanes = Enumerable.ToArray<BackgroundPlane>(Enumerable.Where<BackgroundPlane>((IEnumerable<BackgroundPlane>) this.LevelManager.BackgroundPlanes.Values, (Func<BackgroundPlane, bool>) (x => x.Id >= 0)));
   this.DealGlassesPlane = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     DepthWrites = false,
     AlwaysOnTop = false,
     Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.CurrentLevel.Load<Texture2D>("Other Textures" + (this.GameState.SaveData.Finished64 ? "/deal_with_3d" : "/deal_with_it"))),
     SamplerState = SamplerState.PointClamp
   };
   this.DealGlassesPlane.AddFace(new Vector3(1f, 0.25f, 1f), Vector3.Zero, FaceOrientation.Right, true, true);
   ArtObject artObject = this.CMProvider.CurrentLevel.Load<ArtObject>("Art Objects/TINY_CHAPEAUAO");
   int key = IdentifierPool.FirstAvailable<ArtObjectInstance>(this.LevelManager.ArtObjects);
   this.TinyChapeau = new ArtObjectInstance(artObject)
   {
     Id = key
   };
   this.LevelManager.ArtObjects.Add(key, this.TinyChapeau);
   this.TinyChapeau.Initialize();
   this.TinyChapeau.Hidden = true;
   this.TinyChapeau.ArtObject.Group.Position = new Vector3(-0.125f, 0.375f, -0.125f);
   this.TinyChapeau.ArtObject.Group.BakeTransformInstanced<VertexPositionNormalTextureInstance, Matrix>();
   this.BeamMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     DepthWrites = false,
     AlwaysOnTop = false,
     Material = {
       Diffuse = new Vector3(221f, 178f, (float) byte.MaxValue) / (float) byte.MaxValue
     }
   };
   this.BeamMesh.AddFace(new Vector3(1f, 1f, 1f), Vector3.Zero, FaceOrientation.Right, true, true).Texture = (Texture) this.CMProvider.CurrentLevel.Load<Texture2D>("Other Textures/VerticalGradient");
   Group group = this.BeamMesh.AddFace(new Vector3(2f, 1f, 2f), Vector3.Zero, FaceOrientation.Right, true, true);
   group.Texture = (Texture) this.CMProvider.CurrentLevel.Load<Texture2D>("Other Textures/HorizontalGradient");
   group.Material = new Material()
   {
     Opacity = 0.4f,
     Diffuse = new Vector3(221f, 178f, (float) byte.MaxValue) / (float) byte.MaxValue
   };
   group.Enabled = false;
   this.BeamMask = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     DepthWrites = false,
     AlwaysOnTop = false
   };
   this.BeamMask.AddFace(new Vector3(1f, 1f, 1f), Vector3.Zero, FaceOrientation.Right, true, true);
   this.MatrixMesh = new Mesh()
   {
     Effect = (BaseEffect) new MatrixEffect(),
     DepthWrites = false,
     AlwaysOnTop = false,
     Blending = new BlendingMode?(BlendingMode.Multiply2X)
   };
   this.RaysMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.VertexColored(),
     DepthWrites = false,
     AlwaysOnTop = false,
     Blending = new BlendingMode?(BlendingMode.Alphablending)
   };
   this.FlareMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     DepthWrites = false,
     AlwaysOnTop = false,
     SamplerState = SamplerState.LinearClamp,
     Blending = new BlendingMode?(BlendingMode.Alphablending),
     Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.CurrentLevel.Load<Texture2D>("Other Textures/flare_alpha"))
   };
   this.FlareMesh.AddFace(new Vector3(1f, 1f, 1f), Vector3.Zero, FaceOrientation.Right, true, true);
   this.TrialRaysMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.VertexColored(),
     Blending = new BlendingMode?(BlendingMode.Additive),
     SamplerState = SamplerState.AnisotropicClamp,
     DepthWrites = false,
     AlwaysOnTop = true
   };
   if (this.GameState.IsTrialMode)
     this.TrialRaysMesh.Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Other Textures/smooth_ray"));
   this.TrialFlareMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Other Textures/flare_alpha")),
     Blending = new BlendingMode?(BlendingMode.Alphablending),
     SamplerState = SamplerState.AnisotropicClamp,
     DepthWrites = false,
     AlwaysOnTop = true
   };
   this.TrialFlareMesh.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Right, true);
   this.LoadSounds();
   this.AoInstance.Rotation = Quaternion.CreateFromAxisAngle(Vector3.Up, 1.570796f) * Quaternion.CreateFromAxisAngle(Vector3.Right, (float) Math.Asin(Math.Sqrt(2.0) / Math.Sqrt(3.0))) * Quaternion.CreateFromAxisAngle(Vector3.Up, 0.7853982f);
   this.Origin = this.AoInstance.Position;
   this.AoRotationOrigin = Quaternion.CreateFromAxisAngle(Vector3.Forward, 0.7853982f) * Quaternion.CreateFromAxisAngle(Vector3.Up, 0.7853982f);
   this.AoInstance.Material = new Material();
   this.PlayerManager.Position = new Vector3(18.5f, 879.0 / 32.0, 34.5f);
   this.PlayerManager.Position = this.PlayerManager.Position * Vector3.UnitY + FezMath.XZMask * this.AoInstance.Position;
   this.GomezOrigin = this.PlayerManager.Position;
   this.CameraManager.Center = new Vector3(18.5f, 879.0 / 32.0, 34.5f);
   this.CameraManager.Center = this.CameraManager.Center * Vector3.UnitY + FezMath.XZMask * this.AoInstance.Position + new Vector3(0.0f, 4f, 0.0f);
   this.CameraManager.SnapInterpolation();
   this.CameraOrigin = this.CameraManager.Center;
   while (!this.PlayerManager.CanControl)
     this.PlayerManager.CanControl = true;
   this.PlayerManager.CanControl = false;
   this.CameraManager.Constrained = true;
   this.PlayerManager.HideFez = true;
   this.GenerateCubes();
   for (int index = 1; index < 9; ++index)
     this.MatrixWords[index - 1] = this.CMProvider.CurrentLevel.Load<Texture2D>("Other Textures/zuish_matrix/" + (object) index);
   this.SpinSpeed = 225f;
   SoundEffectExtensions.Emit(this.sHexSlowDown);
   this.eAmbientHex = SoundEffectExtensions.Emit(this.sAmbientHex, true, 0.0f, 0.5f);
   Vector3 vector3 = -FezMath.ForwardVector(this.CameraManager.Viewpoint) * 4f;
   IPlaneParticleSystems planeParticleSystems = this.PlaneParticleSystems;
   EldersHexahedron eldersHexahedron = this;
   Game game = this.Game;
   int maximumCount = 200;
   PlaneParticleSystemSettings particleSystemSettings = new PlaneParticleSystemSettings();
   particleSystemSettings.SpawnVolume = new BoundingBox()
   {
     Min = this.PlayerManager.Position + new Vector3(-1f, 5f, -1f) + vector3,
     Max = this.PlayerManager.Position + new Vector3(1f, 20f, 1f) + vector3
   };
   particleSystemSettings.Velocity.Base = new Vector3(0.0f, -0.5f, 0.0f);
   particleSystemSettings.Velocity.Variation = new Vector3(0.0f, -0.25f, 0.1f);
   particleSystemSettings.SpawningSpeed = 12f;
   particleSystemSettings.ParticleLifetime = 15f;
   particleSystemSettings.Acceleration = -0.1f;
   particleSystemSettings.SizeBirth = (VaryingVector3) new Vector3(0.125f, 0.125f, 0.125f);
   particleSystemSettings.ColorBirth = (VaryingColor) Color.Black;
   particleSystemSettings.ColorLife.Base = new Color(0.6f, 0.6f, 0.6f, 1f);
   particleSystemSettings.ColorLife.Variation = new Color(0.1f, 0.1f, 0.1f, 0.0f);
   particleSystemSettings.ColorDeath = (VaryingColor) Color.Black;
   particleSystemSettings.FullBright = true;
   particleSystemSettings.RandomizeSpawnTime = true;
   particleSystemSettings.FadeInDuration = 0.25f;
   particleSystemSettings.FadeOutDuration = 0.5f;
   particleSystemSettings.Texture = this.CMProvider.Global.Load<Texture2D>("Background Planes/dust_particle");
   particleSystemSettings.BlendingMode = BlendingMode.Additive;
   PlaneParticleSystemSettings settings = particleSystemSettings;
   PlaneParticleSystem planeParticleSystem1;
   PlaneParticleSystem planeParticleSystem2 = planeParticleSystem1 = new PlaneParticleSystem(game, maximumCount, settings);
   eldersHexahedron.Particles = planeParticleSystem1;
   PlaneParticleSystem system = planeParticleSystem2;
   planeParticleSystems.Add(system);
   this.Particles.Enabled = false;
   this.LevelManager.LevelChanged += new Action(this.Kill);
 }
Exemple #15
0
 public override void Initialize()
 {
   base.Initialize();
   this.LogoMesh = new Mesh()
   {
     AlwaysOnTop = true,
     DepthWrites = false,
     Blending = new BlendingMode?(BlendingMode.Alphablending),
     Effect = (BaseEffect) (this.FezEffect = (DefaultEffect) new DefaultEffect.VertexColored())
   };
   this.WireMesh = new Mesh()
   {
     DepthWrites = false,
     AlwaysOnTop = true,
     Effect = this.LogoMesh.Effect
   };
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 2f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(1f, 2f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(1f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(2f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(2f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 2f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 2f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(1f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(4f, 0.0f, 0.0f) + new Vector3(2f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 0.0f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 1f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 1f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 2f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(0.0f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(1f, 3f, 0.0f), Color.Black, false);
   this.LogoMesh.AddColoredBox(Vector3.One, new Vector3(8f, 0.0f, 0.0f) + new Vector3(2f, 3f, 0.0f), Color.Black, false);
   Group group1 = this.WireMesh.AddGroup();
   IndexedUserPrimitives<FezVertexPositionColor> indexedUserPrimitives1 = new IndexedUserPrimitives<FezVertexPositionColor>(PrimitiveType.LineList);
   group1.Geometry = (IIndexedPrimitiveCollection) indexedUserPrimitives1;
   indexedUserPrimitives1.Vertices = new FezVertexPositionColor[16]
   {
     new FezVertexPositionColor(new Vector3(0.0f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(1f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(1f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(2f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(2f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(3f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(3f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(0.0f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(0.0f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(1f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(1f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(2f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(2f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(3f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(3f, 4f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(0.0f, 4f, 1f), Color.White)
   };
   indexedUserPrimitives1.Indices = new int[50]
   {
     0,
     1,
     1,
     2,
     2,
     3,
     3,
     4,
     4,
     5,
     5,
     6,
     6,
     7,
     7,
     0,
     8,
     9,
     9,
     10,
     10,
     11,
     11,
     12,
     12,
     13,
     13,
     14,
     14,
     15,
     15,
     8,
     0,
     8,
     1,
     9,
     2,
     10,
     3,
     11,
     4,
     12,
     5,
     13,
     6,
     14,
     7,
     15,
     0,
     8
   };
   Group group2 = this.WireMesh.AddGroup();
   IndexedUserPrimitives<FezVertexPositionColor> indexedUserPrimitives2 = new IndexedUserPrimitives<FezVertexPositionColor>(PrimitiveType.LineList);
   group2.Geometry = (IIndexedPrimitiveCollection) indexedUserPrimitives2;
   indexedUserPrimitives2.Vertices = new FezVertexPositionColor[20]
   {
     new FezVertexPositionColor(new Vector3(4f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 1f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(5f, 1f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(5f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(6f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(6f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(4f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(4f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 1f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(5f, 1f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(5f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(6f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(6f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(7f, 4f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(4f, 4f, 1f), Color.White)
   };
   indexedUserPrimitives2.Indices = new int[60]
   {
     0,
     1,
     1,
     2,
     2,
     3,
     3,
     4,
     4,
     5,
     5,
     6,
     6,
     7,
     7,
     8,
     8,
     9,
     9,
     0,
     10,
     11,
     11,
     12,
     12,
     13,
     13,
     14,
     14,
     15,
     15,
     16,
     16,
     17,
     17,
     18,
     18,
     19,
     19,
     10,
     0,
     10,
     1,
     11,
     2,
     12,
     3,
     13,
     4,
     14,
     5,
     15,
     6,
     16,
     7,
     17,
     8,
     18,
     9,
     19
   };
   Group group3 = this.WireMesh.AddGroup();
   IndexedUserPrimitives<FezVertexPositionColor> indexedUserPrimitives3 = new IndexedUserPrimitives<FezVertexPositionColor>(PrimitiveType.LineList);
   group3.Geometry = (IIndexedPrimitiveCollection) indexedUserPrimitives3;
   indexedUserPrimitives3.Vertices = new FezVertexPositionColor[22]
   {
     new FezVertexPositionColor(new Vector3(8f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 0.0f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 1f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 1f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 4f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 3f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 2f, 0.0f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 0.0f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 1f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 1f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 2f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(11f, 4f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 4f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(10f, 3f, 1f), Color.White),
     new FezVertexPositionColor(new Vector3(8f, 2f, 1f), Color.White)
   };
   indexedUserPrimitives3.Indices = new int[70]
   {
     0,
     1,
     1,
     2,
     2,
     3,
     3,
     4,
     4,
     5,
     5,
     6,
     6,
     7,
     7,
     8,
     8,
     9,
     9,
     4,
     4,
     10,
     10,
     0,
     11,
     12,
     12,
     13,
     13,
     14,
     14,
     15,
     15,
     16,
     16,
     17,
     17,
     18,
     18,
     19,
     19,
     20,
     20,
     15,
     15,
     21,
     21,
     11,
     0,
     11,
     1,
     12,
     2,
     13,
     3,
     14,
     4,
     15,
     5,
     16,
     6,
     17,
     7,
     18,
     8,
     19,
     9,
     20,
     10,
     21
   };
   this.WireMesh.Position = this.LogoMesh.Position = new Vector3(-5.5f, -2f, -0.5f);
   this.WireMesh.BakeTransform<FezVertexPositionColor>();
   this.LogoMesh.BakeTransform<FezVertexPositionColor>();
   ContentManager contentManager = this.CMProvider.Get(CM.Menu);
   this.sGlitch1 = contentManager.Load<SoundEffect>("Sounds/Intro/FezLogoGlitch1");
   this.sGlitch2 = contentManager.Load<SoundEffect>("Sounds/Intro/FezLogoGlitch2");
   this.sGlitch3 = contentManager.Load<SoundEffect>("Sounds/Intro/FezLogoGlitch3");
   ServiceHelper.AddComponent((IGameComponent) (this.Starfield = new StarField(this.Game)));
   this.Starfield.Opacity = 0.0f;
   this.LogoMesh.Material.Opacity = 0.0f;
   this.untilGlitch = RandomHelper.Between(1.0 / 3.0, 1.0);
 }