Advertisement
fosterboy123

LoadingScreen.cs

Aug 6th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.Xna.Framework;
  6. using Microsoft.Xna.Framework.Content;
  7. using Microsoft.Xna.Framework.Graphics;
  8. using Ze_shooter.Objects;
  9.  
  10. namespace Ze_shooter.Screen
  11. {
  12.     class LoadingScreen : Screen
  13.     {
  14.         protected Texture2D screenTexture;
  15.         protected Helper helper;
  16.         protected GraphicsDevice GraphicsDevice;
  17.         protected int _screenWidth;
  18.         protected int _screenHeight;
  19.  
  20.         public LoadingScreen(EventHandler screenEvent, ContentManager Content, GraphicsDevice GraphicsDevice)
  21.             : base(screenEvent)
  22.         {
  23.             helper = new Helper();
  24.             this.GraphicsDevice = GraphicsDevice;
  25.             _screenWidth = GraphicsDevice.Viewport.Width;
  26.             _screenHeight = GraphicsDevice.Viewport.Height;
  27.         }
  28.  
  29.         public override void Draw(SpriteBatch spriteBatch)
  30.         {
  31.             spriteBatch.Draw(screenTexture, new Rectangle(0, 0,_screenWidth, _screenHeight ), Color.White);
  32.  
  33.             base.Draw(spriteBatch);
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement