Beispiel #1
0
 public override void Initialize()
 {
   base.Initialize();
   PolytronLogo polytronLogo = this;
   Mesh mesh1 = new Mesh();
   mesh1.AlwaysOnTop = true;
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic(1.428571f, 1.428571f, 0.1f, 100f));
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.UnitZ, -Vector3.UnitZ, Vector3.Up));
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   Mesh mesh3 = mesh1;
   polytronLogo.LogoMesh = mesh3;
   for (int index1 = 0; index1 < 4; ++index1)
   {
     FezVertexPositionColor[] vertices = new FezVertexPositionColor[202];
     for (int index2 = 0; index2 < vertices.Length; ++index2)
       vertices[index2] = new FezVertexPositionColor(Vector3.Zero, PolytronLogo.StripColors[index1]);
     this.LogoMesh.AddGroup().Geometry = (IIndexedPrimitiveCollection) new IndexedUserPrimitives<FezVertexPositionColor>(vertices, Enumerable.ToArray<int>(Enumerable.Range(0, vertices.Length)), PrimitiveType.TriangleStrip);
   }
   float viewScale = SettingsManager.GetViewScale(this.GraphicsDevice);
   int width = this.GraphicsDevice.Viewport.Width;
   int height = this.GraphicsDevice.Viewport.Height;
   this.LogoMesh.Position = new Vector3(-0.1975f, -0.25f, 0.0f);
   this.LogoMesh.Scale = new Vector3(new Vector2(500f) * viewScale / new Vector2((float) width, (float) height), 1f);
   bool flag = (double) viewScale >= 1.5;
   this.sPolytron = this.CMProvider.Get(CM.Intro).Load<SoundEffect>("Sounds/Intro/PolytronJingle");
   this.PolytronText = this.CMProvider.Get(CM.Intro).Load<Texture2D>("Other Textures/splash/polytron" + (flag ? "_1440" : ""));
   this.spriteBatch = new SpriteBatch(this.GraphicsDevice);
 }
Beispiel #2
0
 protected override void LoadContent()
 {
   this.fadeOutQuad = new Mesh()
   {
     AlwaysOnTop = true,
     DepthWrites = false
   };
   this.fadeOutQuad.AddFace(Vector3.One * 2f, Vector3.Zero, FaceOrientation.Front, Color.Black, true);
   Mesh mesh = this.fadeOutQuad;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.Identity);
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.Identity);
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh.Effect = (BaseEffect) vertexColored2;
   this.trileFadeQuad = new Mesh()
   {
     AlwaysOnTop = true,
     DepthWrites = false
   };
   this.trileFadeQuad.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, Color.Black, true);
   this.trileFadeQuad.Effect = (BaseEffect) new DefaultEffect.VertexColored();
   this.sound = this.CMProvider.Global.Load<SoundEffect>("Sounds/Gomez/EnterDoor");
   this.LevelManager.LevelChanged += (Action) (() =>
   {
     this.skipPreview = true;
     this.VolumeService.Exit += new Action<int>(this.RevertSkipPreview);
   });
   this.DrawOrder = 901;
 }
Beispiel #3
0
 public override BaseEffect Clone()
 {
     DefaultEffect.VertexColored vertexColored = new DefaultEffect.VertexColored();
     vertexColored.Fullbright      = this.Fullbright;
     vertexColored.Emissive        = this.Emissive;
     vertexColored.AlphaIsEmissive = this.AlphaIsEmissive;
     return((BaseEffect)vertexColored);
 }
Beispiel #4
0
 public override void Initialize()
 {
   base.Initialize();
   FezGrid fezGrid1 = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.Fullbright = true;
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   Mesh mesh3 = mesh1;
   fezGrid1.GoMesh = mesh3;
   this.GomezGroup = this.GoMesh.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, Color.White, true, false, false);
   this.FezGroup = this.GoMesh.AddFace(Vector3.One / 2f, Vector3.Zero, FaceOrientation.Front, Color.Red, true, false, false);
   FezGrid fezGrid2 = this;
   Mesh mesh4 = new Mesh();
   Mesh mesh5 = mesh4;
   DefaultEffect.VertexColored vertexColored3 = new DefaultEffect.VertexColored();
   vertexColored3.Fullbright = true;
   DefaultEffect.VertexColored vertexColored4 = vertexColored3;
   mesh5.Effect = (BaseEffect) vertexColored4;
   Mesh mesh6 = mesh4;
   fezGrid2.TetraMesh = mesh6;
   Vector3[] pointPairs = new Vector3[2560];
   for (int index = 0; index < 1280; ++index)
   {
     pointPairs[index * 2] = new Vector3(-640f, 0.0f, (float) (index - 640));
     pointPairs[index * 2 + 1] = new Vector3(640f, 0.0f, (float) (index - 640));
   }
   Color[] pointColors = Enumerable.ToArray<Color>(Enumerable.Repeat<Color>(Color.Red, 2560));
   this.TetraMesh.AddLines(pointColors, pointPairs, true);
   this.TetraMesh.AddLines(pointColors, Enumerable.ToArray<Vector3>(Enumerable.Select<Vector3, Vector3>((IEnumerable<Vector3>) pointPairs, (Func<Vector3, Vector3>) (v => new Vector3(v.Z, 0.0f, v.X)))), true);
   this.CubeMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.LitVertexColored()
   };
   this.CubeMesh.AddFlatShadedBox(Vector3.One, Vector3.Zero, Color.White, true);
   this.StencilMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     AlwaysOnTop = true,
     DepthWrites = false
   };
   this.StencilMesh.AddFace(FezMath.XZMask * 1280f, Vector3.Zero, FaceOrientation.Top, true);
   this.LevelManager.ActualAmbient = new Color(0.25f, 0.25f, 0.25f);
   this.LevelManager.ActualDiffuse = Color.White;
   this.Reset();
 }
Beispiel #5
0
 public WakingUp(Game game)
   : base(game)
 {
   WakingUp wakingUp = this;
   Mesh mesh1 = new Mesh();
   mesh1.AlwaysOnTop = true;
   mesh1.DepthWrites = false;
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.Identity);
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.Identity);
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   Mesh mesh3 = mesh1;
   wakingUp.fadePlane = mesh3;
   this.fadePlane.AddFace(Vector3.One * 2f, Vector3.Zero, FaceOrientation.Front, Color.Black, true);
   this.Visible = false;
   this.DrawOrder = 101;
 }
Beispiel #6
0
 protected override void LoadContent()
 {
   float aspectRatio = this.GraphicsDevice.Viewport.AspectRatio;
   SaveIndicator saveIndicator = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic(14f * aspectRatio, 14f, 0.1f, 100f));
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(new Vector3(0.0f, 0.0f, 10f), Vector3.Zero, Vector3.Up));
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   mesh1.Blending = new BlendingMode?(BlendingMode.Alphablending);
   mesh1.AlwaysOnTop = true;
   mesh1.DepthWrites = false;
   mesh1.Position = new Vector3(5.5f * aspectRatio, -4.5f, 0.0f);
   Mesh mesh3 = mesh1;
   saveIndicator.mesh = mesh3;
   this.mesh.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, Color.Red, true);
 }
Beispiel #7
0
 public override void Initialize()
 {
   base.Initialize();
   Pixelizer pixelizer = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.Fullbright = true;
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   mesh1.AlwaysOnTop = true;
   mesh1.DepthWrites = false;
   Mesh mesh3 = mesh1;
   pixelizer.GoMesh = mesh3;
   this.GomezGroup = this.GoMesh.AddFace(Vector3.One, Vector3.Zero, FaceOrientation.Front, Color.White, true, false, false);
   this.FezGroup = this.GoMesh.AddFace(Vector3.One / 2f, Vector3.Zero, FaceOrientation.Front, Color.Red, true, false, false);
   this.GoMesh.Effect.ForcedViewMatrix = new Matrix?(new Matrix(1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, -249.95f, 1f));
   this.GoMesh.Effect.ForcedProjectionMatrix = new Matrix?(new Matrix(0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.3555556f, 0.0f, 0.0f, 0.0f, 0.0f, -0.0020004f, 0.0f, 0.0f, 0.0f, -0.00020004f, 1f));
   this.LevelManager.ActualAmbient = new Color(0.25f, 0.25f, 0.25f);
   this.LevelManager.ActualDiffuse = Color.White;
   this.OldSfxVol = this.SoundManager.SoundEffectVolume;
   this.Reset();
 }
Beispiel #8
0
 protected override void LoadContent()
 {
   SplitUpCubeHost splitUpCubeHost1 = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.LitTextured litTextured1 = new DefaultEffect.LitTextured();
   litTextured1.Specular = true;
   litTextured1.Emissive = 0.5f;
   litTextured1.AlphaIsEmissive = true;
   DefaultEffect.LitTextured litTextured2 = litTextured1;
   mesh2.Effect = (BaseEffect) litTextured2;
   mesh1.Blending = new BlendingMode?(BlendingMode.Alphablending);
   Mesh mesh3 = mesh1;
   splitUpCubeHost1.SolidCubes = mesh3;
   SplitUpCubeHost splitUpCubeHost2 = this;
   Mesh mesh4 = new Mesh();
   Mesh mesh5 = mesh4;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.Fullbright = true;
   vertexColored1.AlphaIsEmissive = false;
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh5.Effect = (BaseEffect) vertexColored2;
   mesh4.DepthWrites = false;
   Mesh mesh6 = mesh4;
   splitUpCubeHost2.ChimeOutline = mesh6;
   this.ChimeOutline.AddWireframePolygon(Color.Yellow, new Vector3(0.0f, 0.7071068f, 0.0f), new Vector3(0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, -0.7071068f, 0.0f), new Vector3(-0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, 0.7071068f, 0.0f));
   this.ChimeOutline.AddWireframePolygon(new Color(Color.Yellow.ToVector3() * 0.3333333f), new Vector3(0.0f, 0.7071068f, 0.0f), new Vector3(0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, -0.7071068f, 0.0f), new Vector3(-0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, 0.7071068f, 0.0f));
   this.ChimeOutline.AddWireframePolygon(new Color(Color.Yellow.ToVector3() * 0.1111111f), new Vector3(0.0f, 0.7071068f, 0.0f), new Vector3(0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, -0.7071068f, 0.0f), new Vector3(-0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, 0.7071068f, 0.0f));
   this.ChimeOutline.AddWireframePolygon(new Color(Color.Yellow.ToVector3() * 0.03703704f), new Vector3(0.0f, 0.7071068f, 0.0f), new Vector3(0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, -0.7071068f, 0.0f), new Vector3(-0.7071068f, 0.0f, 0.0f), new Vector3(0.0f, 0.7071068f, 0.0f));
   this.sBitChime = this.CMProvider.Global.Load<SoundEffect>("Sounds/Collects/BitChime");
 }
Beispiel #9
0
 public override void Initialize()
 {
   base.Initialize();
   NowLoadingHexahedron.Phase = NowLoadingHexahedron.Phases.VectorOutline;
   TimeSpan timeSpan;
   NowLoadingHexahedron.SinceTurning = timeSpan = TimeSpan.Zero;
   NowLoadingHexahedron.SinceWavesStarted = timeSpan;
   NowLoadingHexahedron.SincePhaseStarted = timeSpan;
   this.PlayerManager.CanControl = false;
   this.WarpSound = this.CMProvider.GetForLevel(this.GameState.IsTrialMode ? "trial/ELDERS" : "ELDERS").Load<SoundEffect>("Sounds/Zu/HexaWarpIn");
   this.Dot.Hidden = false;
   this.Dot.Behaviour = DotHost.BehaviourType.ClampToTarget;
   this.Dot.Target = this.Center;
   this.Dot.ScalePulsing = 0.0f;
   this.Dot.Opacity = 0.0f;
   Waiters.Wait((Func<bool>) (() => this.PlayerManager.Grounded), (Action) (() =>
   {
     this.WalkTo.Destination = (Func<Vector3>) (() => this.PlayerManager.Position * Vector3.UnitY + this.Center * FezMath.XZMask);
     this.WalkTo.NextAction = ActionType.Idle;
     this.PlayerManager.Action = ActionType.WalkingTo;
   }));
   this.TimeManager.TimeFactor = this.TimeManager.DefaultTimeFactor;
   NowLoadingHexahedron loadingHexahedron1 = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.Fullbright = true;
   vertexColored1.AlphaIsEmissive = false;
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   mesh1.DepthWrites = false;
   mesh1.AlwaysOnTop = true;
   Mesh mesh3 = mesh1;
   loadingHexahedron1.Outline = mesh3;
   this.Outline.AddWireframePolygon(Color.White, new Vector3(0.0f, 0.8660254f, 0.0f), new Vector3(0.7071068f, 0.2886752f, 0.0f), new Vector3(0.7071068f, -0.2886752f, 0.0f), new Vector3(0.0f, -0.8660254f, 0.0f), new Vector3(-0.7071068f, -0.2886752f, 0.0f), new Vector3(-0.7071068f, 0.2886752f, 0.0f), new Vector3(0.0f, 0.8660254f, 0.0f));
   this.Outline.Scale = new Vector3(4f);
   this.Outline.BakeTransform<FezVertexPositionColor>();
   Group firstGroup = this.Outline.FirstGroup;
   firstGroup.Material = new Material();
   firstGroup.Enabled = false;
   for (int index = 0; index < 1024; ++index)
     this.Outline.CloneGroup(firstGroup);
   firstGroup.Enabled = true;
   NowLoadingHexahedron loadingHexahedron2 = this;
   Mesh mesh4 = new Mesh();
   Mesh mesh5 = mesh4;
   DefaultEffect.VertexColored vertexColored3 = new DefaultEffect.VertexColored();
   vertexColored3.Fullbright = true;
   vertexColored3.AlphaIsEmissive = false;
   DefaultEffect.VertexColored vertexColored4 = vertexColored3;
   mesh5.Effect = (BaseEffect) vertexColored4;
   mesh4.DepthWrites = false;
   mesh4.AlwaysOnTop = true;
   mesh4.Material.Opacity = 0.0f;
   Mesh mesh6 = mesh4;
   loadingHexahedron2.WireCube = mesh6;
   this.WireCube.AddWireframeBox(Vector3.One * 4f, Vector3.Zero, Color.White, true);
   this.WireCube.Rotation = Quaternion.CreateFromAxisAngle(Vector3.Right, (float) Math.Asin(Math.Sqrt(2.0) / Math.Sqrt(3.0))) * Quaternion.CreateFromAxisAngle(Vector3.Up, 0.7853982f);
   this.WireCube.BakeTransform<FezVertexPositionColor>();
   NowLoadingHexahedron loadingHexahedron3 = this;
   Mesh mesh7 = new Mesh();
   Mesh mesh8 = mesh7;
   DefaultEffect.LitVertexColored litVertexColored1 = new DefaultEffect.LitVertexColored();
   litVertexColored1.Fullbright = false;
   litVertexColored1.AlphaIsEmissive = false;
   DefaultEffect.LitVertexColored litVertexColored2 = litVertexColored1;
   mesh8.Effect = (BaseEffect) litVertexColored2;
   mesh7.AlwaysOnTop = true;
   mesh7.Material.Opacity = 0.0f;
   Mesh mesh9 = mesh7;
   loadingHexahedron3.SolidCube = mesh9;
   this.SolidCube.AddFlatShadedBox(Vector3.One * 4f, Vector3.Zero, Color.White, true);
   this.SolidCube.Rotation = Quaternion.CreateFromAxisAngle(Vector3.Right, (float) Math.Asin(Math.Sqrt(2.0) / Math.Sqrt(3.0))) * Quaternion.CreateFromAxisAngle(Vector3.Up, 0.7853982f);
   this.SolidCube.BakeTransform<VertexPositionNormalColor>();
   NowLoadingHexahedron loadingHexahedron4 = this;
   Mesh mesh10 = new Mesh();
   Mesh mesh11 = mesh10;
   DefaultEffect.Textured textured1 = new DefaultEffect.Textured();
   textured1.Fullbright = true;
   textured1.AlphaIsEmissive = false;
   DefaultEffect.Textured textured2 = textured1;
   mesh11.Effect = (BaseEffect) textured2;
   mesh10.DepthWrites = false;
   mesh10.Material.Opacity = 0.0f;
   mesh10.Blending = new BlendingMode?(BlendingMode.Alphablending);
   mesh10.SamplerState = SamplerState.LinearClamp;
   Mesh mesh12 = mesh10;
   loadingHexahedron4.Flare = mesh12;
   this.Flare.AddFace(Vector3.One * 4f, Vector3.Zero, FaceOrientation.Front, true);
   this.Flare.Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Other Textures/flare_alpha"));
   this.Rays = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.Textured(),
     Texture = (Dirtyable<Texture>) ((Texture) this.CMProvider.Global.Load<Texture2D>("Other Textures/smooth_ray")),
     Blending = new BlendingMode?(BlendingMode.Additive),
     SamplerState = SamplerState.AnisotropicClamp,
     DepthWrites = false,
     AlwaysOnTop = true
   };
   for (int index = 0; index < 128; ++index)
   {
     float x = 0.75f;
     float num = 0.0075f;
     Group group = this.Rays.AddGroup();
     group.Geometry = (IIndexedPrimitiveCollection) new IndexedUserPrimitives<FezVertexPositionTexture>(new FezVertexPositionTexture[6]
     {
       new FezVertexPositionTexture(new Vector3(0.0f, (float) ((double) num / 2.0 * 0.100000001490116), 0.0f), new Vector2(0.0f, 0.0f)),
       new FezVertexPositionTexture(new Vector3(x, num / 2f, 0.0f), new Vector2(1f, 0.0f)),
       new FezVertexPositionTexture(new Vector3(x, (float) ((double) num / 2.0 * 0.100000001490116), 0.0f), new Vector2(1f, 0.45f)),
       new FezVertexPositionTexture(new Vector3(x, (float) (-(double) num / 2.0 * 0.100000001490116), 0.0f), new Vector2(1f, 0.55f)),
       new FezVertexPositionTexture(new Vector3(x, (float) (-(double) num / 2.0), 0.0f), new Vector2(1f, 1f)),
       new FezVertexPositionTexture(new Vector3(0.0f, (float) (-(double) num / 2.0 * 0.100000001490116), 0.0f), new Vector2(0.0f, 1f))
     }, new int[12]
     {
       0,
       1,
       2,
       0,
       2,
       5,
       5,
       2,
       3,
       5,
       3,
       4
     }, PrimitiveType.TriangleList);
     group.Rotation = Quaternion.CreateFromAxisAngle(Vector3.Forward, RandomHelper.Between(0.0, 6.28318548202515));
     group.Material = new Material()
     {
       Diffuse = new Vector3(0.0f)
     };
   }
   ServiceHelper.AddComponent((IGameComponent) (this.TheDarkening = new NowLoadingHexahedron.Darkener(this.Game)));
   this.LevelManager.LevelChanged += new Action(this.Kill);
   SoundEffectExtensions.Emit(this.WarpSound).Persistent = true;
 }
Beispiel #10
0
 private void Reset()
 {
   this.FractalMeshes.Clear();
   this.OuterShellMesh = new Mesh()
   {
     Effect = (BaseEffect) new DefaultEffect.LitVertexColored()
   };
   Fractal.AddShell(this.OuterShellMesh, true, true);
   Fractal.AddShell(this.OuterShellMesh, false, true);
   Mesh mesh1 = this.OuterShellMesh;
   bool positive = true;
   for (int index = 0; index < 15; ++index)
   {
     Mesh mesh2 = new Mesh()
     {
       Effect = (BaseEffect) new DefaultEffect.LitVertexColored(),
       Material = {
         Diffuse = Color.Cyan.ToVector3()
       }
     };
     Fractal.AddShell(mesh2, positive, false);
     mesh2.Culling = positive ? CullMode.CullCounterClockwiseFace : CullMode.CullClockwiseFace;
     mesh2.CustomData = (object) (bool) (positive ? 1 : 0);
     mesh2.Parent = mesh1;
     this.FractalMeshes.Add(mesh2);
     positive = !positive;
     mesh1 = mesh2;
   }
   Fractal fractal = this;
   Mesh mesh3 = new Mesh();
   Mesh mesh4 = mesh3;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.Fullbright = true;
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh4.Effect = (BaseEffect) vertexColored2;
   Mesh mesh5 = mesh3;
   fractal.AxisMesh = mesh5;
   this.AxisMesh.AddColoredBox(new Vector3(1f, 1f, 10000f) / 200f, Vector3.Zero, Color.Blue, false);
   this.AxisMesh.AddColoredBox(new Vector3(1f, 10000f, 1f) / 200f, Vector3.Zero, Color.Green, false);
   this.AxisMesh.AddColoredBox(new Vector3(10000f, 1f, 1f) / 200f, Vector3.Zero, Color.Red, false);
   this.OuterShellMesh.Scale = Vector3.One * 2f;
 }
Beispiel #11
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);
 }
Beispiel #12
0
 private void InitializeWatchers()
 {
   this.watchers = new Dictionary<TrileInstance, WatchersHost.WatcherState>();
   if (this.LevelManager.TrileSet == null)
     return;
   foreach (TrileInstance instance in Enumerable.SelectMany<Trile, TrileInstance>(Enumerable.Where<Trile>((IEnumerable<Trile>) this.LevelManager.TrileSet.Triles.Values, (Func<Trile, bool>) (t => t.ActorSettings.Type == ActorType.Watcher)), (Func<Trile, IEnumerable<TrileInstance>>) (t => (IEnumerable<TrileInstance>) t.Instances)))
   {
     instance.Trile.Size = new Vector3(31.0 / 32.0);
     instance.PhysicsState = new InstancePhysicsState(instance);
     Dictionary<TrileInstance, WatchersHost.WatcherState> dictionary = this.watchers;
     TrileInstance key = instance;
     WatchersHost.WatcherState watcherState1 = new WatchersHost.WatcherState();
     WatchersHost.WatcherState watcherState2 = watcherState1;
     Mesh mesh1 = new Mesh();
     Mesh mesh2 = mesh1;
     DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
     vertexColored1.Fullbright = true;
     DefaultEffect.VertexColored vertexColored2 = vertexColored1;
     mesh2.Effect = (BaseEffect) vertexColored2;
     Mesh mesh3 = mesh1;
     watcherState2.Eyes = mesh3;
     watcherState1.OriginalCenter = instance.Center;
     watcherState1.CrashAttenuation = 1f;
     WatchersHost.WatcherState watcherState3 = watcherState1;
     dictionary.Add(key, watcherState3);
     this.watchers[instance].Eyes.AddColoredBox(Vector3.One / 16f, Vector3.Zero, new Color((int) byte.MaxValue, (int) sbyte.MaxValue, 0), false);
     this.watchers[instance].Eyes.AddColoredBox(Vector3.One / 16f, Vector3.Zero, new Color((int) byte.MaxValue, (int) sbyte.MaxValue, 0), false);
     this.watchers[instance].Eyes.AddColoredBox(Vector3.One / 16f, Vector3.Zero, new Color((int) byte.MaxValue, (int) sbyte.MaxValue, 0), false);
     this.watchers[instance].Eyes.AddColoredBox(Vector3.One / 16f, Vector3.Zero, new Color((int) byte.MaxValue, (int) sbyte.MaxValue, 0), false);
   }
 }
Beispiel #13
0
 public override BaseEffect Clone()
 {
   DefaultEffect.VertexColored vertexColored = new DefaultEffect.VertexColored();
   vertexColored.Fullbright = this.Fullbright;
   vertexColored.Emissive = this.Emissive;
   vertexColored.AlphaIsEmissive = this.AlphaIsEmissive;
   return (BaseEffect) vertexColored;
 }
Beispiel #14
0
 protected override void LoadContent()
 {
   this.SpriteBatch = new SpriteBatch(this.GraphicsDevice);
   this.tr = new GlyphTextRenderer(this.Game);
   ContentManager contentManager = this.CMProvider.Get(CM.Menu);
   this.PointerCursor = contentManager.Load<Texture2D>("Other Textures/cursor/CURSOR_POINTER");
   this.CanClickCursor = contentManager.Load<Texture2D>("Other Textures/cursor/CURSOR_CLICKER_A");
   this.ClickedCursor = contentManager.Load<Texture2D>("Other Textures/cursor/CURSOR_CLICKER_B");
   this.sAdvanceLevel = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/AdvanceLevel");
   this.sCancel = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/Cancel");
   this.sConfirm = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/Confirm");
   this.sCursorUp = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/CursorUp");
   this.sCursorDown = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/CursorDown");
   this.sExitGame = this.CMProvider.Global.Load<SoundEffect>("Sounds/Ui/Menu/ExitGame");
   this.sReturnLevel = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/ReturnLevel");
   this.sScreenNarrowen = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/ScreenNarrowen");
   this.sScreenWiden = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/ScreenWiden");
   this.sSliderValueDecrease = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/SliderValueDecrease");
   this.sSliderValueIncrease = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/SliderValueIncrease");
   this.sStartGame = this.CMProvider.Global.Load<SoundEffect>("Sounds/Ui/Menu/StartGame");
   this.sAppear = contentManager.Load<SoundEffect>("Sounds/Ui/Menu/Appear");
   this.sDisappear = this.CMProvider.Global.Load<SoundEffect>("Sounds/Ui/Menu/Disappear");
   this.LeaderboardsMenu.InputManager = this.InputManager;
   this.LeaderboardsMenu.GameState = this.GameState;
   this.LeaderboardsMenu.Font = this.Fonts.Big;
   this.LeaderboardsMenu.MouseState = this.MouseState;
   this.ControlsMenu.FontManager = this.Fonts;
   this.ControlsMenu.CMProvider = this.CMProvider;
   this.CreditsMenu.FontManager = this.Fonts;
   foreach (MenuLevel menuLevel in this.MenuLevels)
   {
     menuLevel.CMProvider = this.CMProvider;
     menuLevel.Initialize();
   }
   MenuBase menuBase1 = this;
   Mesh mesh1 = new Mesh();
   Mesh mesh2 = mesh1;
   DefaultEffect.VertexColored vertexColored1 = new DefaultEffect.VertexColored();
   vertexColored1.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitZ, Vector3.Up));
   vertexColored1.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic((float) this.GraphicsDevice.Viewport.Width, (float) this.GraphicsDevice.Viewport.Height, 0.1f, 100f));
   DefaultEffect.VertexColored vertexColored2 = vertexColored1;
   mesh2.Effect = (BaseEffect) vertexColored2;
   mesh1.DepthWrites = false;
   mesh1.AlwaysOnTop = true;
   mesh1.Culling = CullMode.None;
   Mesh mesh3 = mesh1;
   menuBase1.Selector = mesh3;
   this.Selector.AddLines(new Color[4]
   {
     Color.White,
     Color.White,
     Color.White,
     Color.White
   }, new Vector3(-1f, -1f, 10f), new Vector3(-1f, 1f, 10f), new Vector3(1f, 1f, 10f), new Vector3(1f, -1f, 10f));
   this.Selector.AddLines(new Color[4]
   {
     Color.White,
     Color.White,
     Color.White,
     Color.White
   }, new Vector3(-1f, 1f, 10f), new Vector3(0.0f, 1f, 10f), new Vector3(-1f, -1f, 10f), new Vector3(0.0f, -1f, 10f));
   this.Selector.AddLines(new Color[4]
   {
     Color.White,
     Color.White,
     Color.White,
     Color.White
   }, new Vector3(0.0f, 1f, 10f), new Vector3(1f, 1f, 10f), new Vector3(0.0f, -1f, 10f), new Vector3(1f, -1f, 10f));
   MenuBase menuBase2 = this;
   Mesh mesh4 = new Mesh();
   Mesh mesh5 = mesh4;
   DefaultEffect.VertexColored vertexColored3 = new DefaultEffect.VertexColored();
   vertexColored3.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitZ, Vector3.Up));
   vertexColored3.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic((float) this.GraphicsDevice.Viewport.Width, (float) this.GraphicsDevice.Viewport.Height, 0.1f, 100f));
   DefaultEffect.VertexColored vertexColored4 = vertexColored3;
   mesh5.Effect = (BaseEffect) vertexColored4;
   mesh4.DepthWrites = false;
   mesh4.AlwaysOnTop = true;
   mesh4.Culling = CullMode.None;
   mesh4.Enabled = false;
   Mesh mesh6 = mesh4;
   menuBase2.Frame = mesh6;
   this.Frame.AddLines(new Color[8]
   {
     Color.White,
     Color.White,
     Color.White,
     Color.White,
     Color.White,
     Color.White,
     Color.White,
     Color.White
   }, new Vector3(-1f, -1f, 10f), new Vector3(-1f, 1f, 10f), new Vector3(1f, 1f, 10f), new Vector3(1f, -1f, 10f), new Vector3(-1f, 1f, 10f), new Vector3(1f, 1f, 10f), new Vector3(-1f, -1f, 10f), new Vector3(1f, -1f, 10f));
   MenuBase menuBase3 = this;
   Mesh mesh7 = new Mesh();
   Mesh mesh8 = mesh7;
   DefaultEffect.Textured textured1 = new DefaultEffect.Textured();
   textured1.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitZ, Vector3.Up));
   textured1.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic((float) this.GraphicsDevice.Viewport.Width, (float) this.GraphicsDevice.Viewport.Height, 0.1f, 100f));
   DefaultEffect.Textured textured2 = textured1;
   mesh8.Effect = (BaseEffect) textured2;
   mesh7.DepthWrites = false;
   mesh7.AlwaysOnTop = true;
   mesh7.SamplerState = SamplerState.PointClamp;
   Mesh mesh9 = mesh7;
   menuBase3.MenuLevelOverlay = mesh9;
   this.MenuLevelOverlay.AddFace(new Vector3(2f, 2f, 1f), new Vector3(0.0f, 0.0f, 10f), FaceOrientation.Back, true);
   MenuBase menuBase4 = this;
   Mesh mesh10 = new Mesh();
   Mesh mesh11 = mesh10;
   DefaultEffect.Textured textured3 = new DefaultEffect.Textured();
   textured3.ForcedViewMatrix = new Matrix?(Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitZ, Vector3.Up));
   textured3.ForcedProjectionMatrix = new Matrix?(Matrix.CreateOrthographic((float) this.GraphicsDevice.Viewport.Width, (float) this.GraphicsDevice.Viewport.Height, 0.1f, 100f));
   DefaultEffect.Textured textured4 = textured3;
   mesh11.Effect = (BaseEffect) textured4;
   mesh10.DepthWrites = false;
   mesh10.AlwaysOnTop = true;
   Mesh mesh12 = mesh10;
   menuBase4.Mask = mesh12;
   this.Mask.AddFace(new Vector3(2f, 2f, 1f), new Vector3(0.0f, 0.0f, 10f), FaceOrientation.Back, true);
   Waiters.Wait(0.0, new Action(this.Rescale));
   this.RenderToTexture();
 }