Beispiel #1
0
 public static void SetDefaultDesignResolution(
     int width,
     int height,
     SceneResolutionPolicy sceneResolutionPolicy)
 {
     defaultDesignResolutionSize  = new Point(width, height);
     defaultSceneResolutionPolicy = sceneResolutionPolicy;
 }
Beispiel #2
0
 /// <summary>
 /// sets the default design size and resolution policy that new scenes will use. horizontal/verticalBleed are only relevant for BestFit.
 /// </summary>
 /// <param name="width">Width.</param>
 /// <param name="height">Height.</param>
 /// <param name="sceneResolutionPolicy">Scene resolution policy.</param>
 /// <param name="horizontalBleed">Horizontal bleed size. Used only if resolution policy is set to <see cref="SceneResolutionPolicy.BestFit"/>.</param>
 /// <param name="verticalBleed">Vertical bleed size. Used only if resolution policy is set to <see cref="SceneResolutionPolicy.BestFit"/>.</param>
 public static void SetDefaultDesignResolution(int width, int height, SceneResolutionPolicy sceneResolutionPolicy, int horizontalBleed = 0, int verticalBleed = 0)
 {
     _defaultDesignResolutionSize  = new Point(width, height);
     _defaultSceneResolutionPolicy = sceneResolutionPolicy;
     if (_defaultSceneResolutionPolicy == SceneResolutionPolicy.BestFit)
     {
         _defaultDesignBleedSize = new Point(horizontalBleed, verticalBleed);
     }
 }
Beispiel #3
0
 public void SetDesignResolution(
     int width,
     int height,
     SceneResolutionPolicy sceneResolutionPolicy)
 {
     this.DesignResolutionSize = new Point(width, height);
     this.resolutionPolicy     = sceneResolutionPolicy;
     this.UpdateResolutionScaler();
 }
Beispiel #4
0
 /// <summary>
 /// sets the design size and resolution policy then updates the render textures
 /// </summary>
 /// <param name="width">Width.</param>
 /// <param name="height">Height.</param>
 /// <param name="sceneResolutionPolicy">Scene resolution policy.</param>
 /// <param name="horizontalBleed">Horizontal bleed size. Used only if resolution policy is set to <see cref="SceneResolutionPolicy.BestFit"/>.</param>
 /// <param name="verticalBleed">Horizontal bleed size. Used only if resolution policy is set to <see cref="SceneResolutionPolicy.BestFit"/>.</param>
 public void setDesignResolution(int width, int height, SceneResolutionPolicy sceneResolutionPolicy, int horizontalBleed = 0, int verticalBleed = 0)
 {
     _designResolutionSize = new Point(width, height);
     _resolutionPolicy     = sceneResolutionPolicy;
     if (_resolutionPolicy == SceneResolutionPolicy.BestFit)
     {
         _designBleedSize = new Point(horizontalBleed, verticalBleed);
     }
     updateResolutionScaler();
 }
Beispiel #5
0
		public Scene()
		{
			entities = new EntityList( this );
			renderableComponents = new RenderableComponentList();
			content = new NezContentManager();

			var cameraEntity = createEntity( "camera" );
			camera = cameraEntity.addComponent( new Camera() );

			if( Core.entitySystemsEnabled )
				entityProcessors = new EntityProcessorList();

			// setup our resolution policy. we'll commit it in begin
			_resolutionPolicy = defaultSceneResolutionPolicy;
			_designResolutionSize = defaultDesignResolutionSize;

			initialize();
		}
Beispiel #6
0
 /// <summary>
 /// sets the design size and resolution policy then updates the render textures
 /// </summary>
 /// <param name="width">Width.</param>
 /// <param name="height">Height.</param>
 /// <param name="sceneResolutionPolicy">Scene resolution policy.</param>
 public void setDesignResolution(int width, int height, SceneResolutionPolicy sceneResolutionPolicy)
 {
     _designResolutionSize = new Point(width, height);
     _resolutionPolicy     = sceneResolutionPolicy;
     updateResolutionScaler();
 }
Beispiel #7
0
 //znznznznznznznznznznznzn
 //      MainScene
 //znznznznznznznznznznznzn
 public MainScene()
 {
     policy = Scene.SceneResolutionPolicy.ExactFit;
 }