示例#1
0
 public GameState()
 {
     SceneCamera = new Camera();
     ParticuleManager = new ParticuleManager();
     IsActive = false;
 }
 //********************************** BEGIN/END/CLEAR PROXIES ****************************
 /// <summary>
 /// Render without any camera (For HUD only !)
 /// </summary>
 public void BeginNoCamera()
 {
     _spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Resolution.ResolutionMatrix);
     _currentCamera = null;
 }
 /// <summary>
 /// Using the given camera, start rendering a scene with Parallax
 /// </summary>
 public void Begin(Camera camera, Vector2 parallax)
 {
     _spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.ApplyParallax(parallax));
 }
 /// <summary>
 /// Using the given camera and parameters, start rendering a scene
 /// </summary>
 /// <param name="spriteSortMode"></param>
 /// <param name="blendState"></param>
 public void Begin(Camera camera, SpriteSortMode spriteSortMode, BlendState blendState)
 {
     _spriteBatch.Begin(spriteSortMode, blendState, SamplerState.PointClamp, null, null, null, camera.CameraMatrix);
     _currentCamera = camera;
 }
 /// <summary>
 /// Using the given camera, start rendering a scene
 /// </summary>
 public void Begin(Camera camera)
 {
     this.Begin(camera, SpriteSortMode.Deferred, BlendState.AlphaBlend);
 }