示例#1
0
 public ClientScreen()
 {
     qR = new QuadRenderer();
     clientBox = new MessageBox(10, 0, 0);
     serverBox = new MessageBox(10, 624, 0);
     serverBox.IsVisible = false;
     clientBox.IsVisible = false;
     clientState = ClientState.currentInstance;
 }
示例#2
0
 public ScreenManager(GraphicsDevice graphicsDevice, ContentManager cm)
 {
     if (currentInstance == null)
     {
         ContentManager = cm;
         qr = new QuadRenderer();
         transitionEffect = cm.Load<Effect>("shaders/transition");
         GraphicsDevice = graphicsDevice;
         SpriteBatch = new SpriteBatch(graphicsDevice);
         newRenderTarget = new RenderTarget2D(GraphicsDevice, Game1.width, Game1.height, false, SurfaceFormat.Color, DepthFormat.Depth24);
         oldRenderTarget = new RenderTarget2D(GraphicsDevice, Game1.width, Game1.height, false, SurfaceFormat.Color, DepthFormat.Depth24);
         currentInstance = this;
     }
     else
     {
         throw new Exception("only one instance of ScreenManager can be instantiated");
     }
 }