Beispiel #1
0
 public bool Contains(RectangleF r)
 {
     return !((r.Left < this.Left) || (r.Top < this.Top) || (r.Bottom > this.Bottom) || (r.Right > this.Right));
 }
Beispiel #2
0
 public bool Intersect(RectangleF r)
 {
     return !((r.Left > this.Right) || (r.Right < this.Left) || (r.Top > this.Bottom) || (r.Bottom < this.Top));
 }
Beispiel #3
0
 public Camera2D(float width, float height)
 {
     visibleArea = new RectangleF(0, 0, width, height);
     position = ScreenPosition;
 }
Beispiel #4
0
 public Camera2D(float x, float y, float width, float height)
 {
     visibleArea = new RectangleF(x - (width / 2), y - (height / 2), width, height);
     position.X = x;
     position.Y = y;
 }
Beispiel #5
0
 public Camera2D()
 {
     visibleArea = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
     position = ScreenPosition;
 }