Began trying to fix primitive batch. Added a default camera to the configuration.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace RecrownedAthenaeum.ScreenSystem
|
||||
/// Called when the first loading screen is done, and needs to show the landing screen.
|
||||
/// </summary>
|
||||
public event ShowFirstScreen ShowFirstScreenEvent;
|
||||
private GraphicsDeviceManager graphics = Configuration.graphicsDeviceManager;
|
||||
private GraphicsDeviceManager graphics;
|
||||
private Screen previousScreen;
|
||||
private RenderTarget2D previousScreenRenderTarget;
|
||||
private Screen currentScreen;
|
||||
@@ -63,13 +63,15 @@ namespace RecrownedAthenaeum.ScreenSystem
|
||||
/// <summary>
|
||||
/// Creates a screen manager that helps manage multiple screens and their transitions.
|
||||
/// </summary>
|
||||
/// <param name="camera">The camera to be used to perform the correct translations and transformations.</param>
|
||||
/// <param name="graphicsDeviceManager">The graphics device manager to be used.</param>
|
||||
public ScreenManager(Camera2D camera, GraphicsDeviceManager graphicsDeviceManager = null)
|
||||
/// <param name="camera">The camera to be used to perform the correct translations and transformations. Will use default set in <see cref="Configuration"/> if left null.</param>
|
||||
/// <param name="graphicsDeviceManager">The graphics device manager to be used. Will use default set in <see cref="Configuration"/> if left null.</param>
|
||||
public ScreenManager(Camera2D camera = null, GraphicsDeviceManager graphicsDeviceManager = null)
|
||||
{
|
||||
if (graphicsDeviceManager != null) this.graphics = graphicsDeviceManager;
|
||||
if (graphics == null) throw new ArgumentNullException("Graphics device manager argument cannot be null if setup's graphics device manager is also null.");
|
||||
this.camera = camera;
|
||||
if (camera == null) camera = Configuration.Camera2D;
|
||||
if (graphicsDeviceManager == null) graphicsDeviceManager = Configuration.GraphicsDeviceManager;
|
||||
|
||||
graphics = graphicsDeviceManager ?? throw new ArgumentNullException("Graphics device manager argument cannot be null if setup's graphics device manager is also null.");
|
||||
this.camera = camera ?? throw new ArgumentNullException("2d camera argument cannot be null if setup's 2d camera is also null.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user