Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void Draw(GameTime gameTime)
- {
- graphics.GraphicsDevice.Clear(Color.Black);
- graphics.GraphicsDevice.VertexDeclaration = vertexDeclaration;
- graphicsDevice.RenderState.FillMode = FillMode.WireFrame;
- // Update our camera
- UpdateCameraThirdPerson();
- basicEffect.Begin();
- basicEffect.Projection = proj;
- basicEffect.View = view;
- basicEffect.Alpha = 1.0f;
- basicEffect.DiffuseColor = new Vector3(.75f, .75f, .75f);
- basicEffect.SpecularColor = new Vector3(0.25f, 0.25f, 0.25f);
- basicEffect.SpecularPower = 5.0f;
- basicEffect.AmbientLightColor = new Vector3(0.75f, 0.75f, 0.75f);
- basicEffect.DirectionalLight0.Enabled = true;
- basicEffect.DirectionalLight0.DiffuseColor = Vector3.One;
- basicEffect.DirectionalLight0.Direction = Vector3.Normalize(new Vector3(1.0f, -1.0f, -1.0f));
- basicEffect.DirectionalLight0.SpecularColor = Vector3.One;
- basicEffect.DirectionalLight1.Enabled = true;
- basicEffect.DirectionalLight1.DiffuseColor = new Vector3(0.8f, 0.8f, 0.8f);
- basicEffect.DirectionalLight1.Direction = Vector3.Normalize(new Vector3(-1.0f, -1.0f, 1.0f));
- basicEffect.LightingEnabled = true;
- foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
- {
- pass.Begin();
- graphics.GraphicsDevice.RenderState.FillMode = FillMode.WireFrame;
- Render();
- pass.End();
- }
- basicEffect.End();
- Matrix World = Matrix.CreateRotationY(avatarYaw) * Matrix.CreateTranslation(avatarPosition);
- DrawCameraState();
- spriteBatch.Begin();
- spriteBatch.DrawString(spriteFont, "Esc: Opens the console.", new Vector2(10, graphics.GraphicsDevice.Viewport.Height - 30), Color.White);
- spriteBatch.End();
- base.Draw(gameTime);
- }
Add Comment
Please, Sign In to add comment