simplify lightingEffect initialization

GitOrigin-RevId: 28ca3d2336fe78f152aff2b810e90dc06e7816b6
This commit is contained in:
Colin McMillen 2020-02-19 11:24:44 -05:00
parent 57d15cbbd9
commit 8405f32f3c

View File

@ -28,10 +28,11 @@ namespace SemiColinGames {
graphics, camera.Width, camera.Height, false /* mipmap */, graphics, camera.Width, camera.Height, false /* mipmap */,
graphics.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); graphics.PresentationParameters.BackBufferFormat, DepthFormat.Depth24);
lightingEffect = new BasicEffect(graphics); lightingEffect = new BasicEffect(graphics) {
lightingEffect.World = Matrix.CreateTranslation(0, 0, 0); World = Matrix.CreateTranslation(0, 0, 0),
lightingEffect.View = Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up); View = Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up),
lightingEffect.VertexColorEnabled = true; VertexColorEnabled = true
};
spriteBatch = new SpriteBatch(graphics); spriteBatch = new SpriteBatch(graphics);
} }