예제 #1
0
파일: Intro.cs 프로젝트: Zeludon/FEZ
 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);
 }
예제 #2
0
파일: DrumSolo.cs 프로젝트: Zeludon/FEZ
 public override void Initialize()
 {
   base.Initialize();
   this.DestinationRadius = 20f * SettingsManager.GetViewScale(this.GraphicsDevice);
   this.Flare = new Mesh()
   {
     Blending = new BlendingMode?(BlendingMode.Additive),
     SamplerState = SamplerState.LinearClamp,
     DepthWrites = false
   };
   this.Flare.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, true, true);
   this.StarMesh = new Mesh()
   {
     Blending = new BlendingMode?(BlendingMode.Alphablending),
     DepthWrites = false
   };
   Color color = new Color(1f, 1f, 0.3f, 0.0f);
   for (int index = 0; index < 8; ++index)
   {
     float num1 = (float) ((double) index * 6.28318548202515 / 8.0);
     float num2 = (float) (((double) index + 0.5) * 6.28318548202515 / 8.0);
     this.StarMesh.AddColoredTriangle(Vector3.Zero, new Vector3((float) Math.Sin((double) num1), (float) Math.Cos((double) num1), 0.0f), new Vector3((float) Math.Sin((double) num2), (float) Math.Cos((double) num2), 0.0f), new Color(1f, 1f, 0.5f, 0.7f), color, color);
   }
   this.Flare.Effect = (BaseEffect) new DefaultEffect.Textured();
   this.StarMesh.Effect = (BaseEffect) new DefaultEffect.VertexColored();
   this.Flare.Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Background Planes/flare"));
   ServiceHelper.AddComponent((IGameComponent) (this.FezLogo = new FezLogo(this.Game)));
   this.FezLogo.Enabled = false;
   this.sTitleBassHit = this.CMProvider.Global.Load<SoundEffect>("Sounds/Intro/LogoZoom");
 }