Guest User

ScreenManagerOptions

a guest
May 26th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1. using ArbitraryPixel.Common.Graphics;
  2. using System;
  3.  
  4. namespace ArbitraryPixel.Common.Screen
  5. {
  6.     /// <summary>
  7.     /// Represents options for an IScreenManager object.
  8.     /// </summary>
  9.     public class ScreenManagerOptions
  10.     {
  11.         /// <summary>
  12.         /// An object responsible for drawing drawing ScreenBackground and WorldBackground.
  13.         /// </summary>
  14.         public ISpriteBatch SpriteBatch { get; private set; }
  15.  
  16.         /// <summary>
  17.         /// If set, draws a background that encompasses the screen dimensions during BeginDraw.
  18.         /// </summary>
  19.         public BackgroundTextureDefinition ScreenBackground { get; set; }
  20.  
  21.         /// <summary>
  22.         /// If set, draws a background that encompasses the scaled world dimensions during BeginDraw.
  23.         /// </summary>
  24.         public BackgroundTextureDefinition WorldBackground { get; set; }
  25.  
  26.         /// <summary>
  27.         /// Create a new object with the specified spritebatch.
  28.         /// </summary>
  29.         /// <param name="spriteBatch">The spritebatch that will be used to draw the texture definitions, if they are set.</param>
  30.         public ScreenManagerOptions(ISpriteBatch spriteBatch)
  31.         {
  32.             this.SpriteBatch = spriteBatch ?? throw new ArgumentNullException();
  33.         }
  34.     }
  35. }
Add Comment
Please, Sign In to add comment