private-ize members of Scene

This commit is contained in:
Colin McMillen 2020-07-15 14:53:03 -04:00
parent 9b25a8a6e0
commit 0f6424e4a1

View File

@ -7,20 +7,20 @@ namespace SemiColinGames {
public sealed class Scene : IScene { public sealed class Scene : IScene {
const float DESIRED_ASPECT_RATIO = 1920.0f / 1080.0f; const float DESIRED_ASPECT_RATIO = 1920.0f / 1080.0f;
Color backgroundColor = Color.CornflowerBlue; private readonly Color backgroundColor = Color.CornflowerBlue;
readonly GraphicsDevice graphics; private readonly GraphicsDevice graphics;
readonly Camera camera; private readonly Camera camera;
readonly RenderTarget2D sceneTarget; private readonly RenderTarget2D sceneTarget;
readonly BasicEffect basicEffect; private readonly BasicEffect basicEffect;
readonly SpriteBatch spriteBatch; private readonly SpriteBatch spriteBatch;
readonly SoundEffectInstance music; private readonly SoundEffectInstance music;
// Draw() needs to be called without IsRunningSlowly this many times before we actually // Draw() needs to be called without IsRunningSlowly this many times before we actually
// attempt to draw the scene. This is a workaround for the fact that otherwise the first few // attempt to draw the scene. This is a workaround for the fact that otherwise the first few
// frames can be really slow to draw. // frames can be really slow to draw.
int framesToSuppress = 2; private int framesToSuppress = 2;
public Scene(GraphicsDevice graphics, Camera camera) { public Scene(GraphicsDevice graphics, Camera camera) {
this.graphics = graphics; this.graphics = graphics;