Пример #1
0
 public BaseCamera(BaseCamera cam)
 {
     camStack = new Stack<BaseCamera>();
     this.SetCamera(cam);
 }
Пример #2
0
        public void SetCamera(BaseCamera cam)
        {
            this.Screen = new Rectangle(cam.Screen.X, cam.Screen.Y, cam.Screen.Width, cam.Screen.Height);
            this.MapOffset = new Vector2(cam.MapOffset.X, cam.MapOffset.Y);
            this.CameraOffset = new Vector2(cam.CameraOffset.X, cam.CameraOffset.Y);

            this.Viewport.X = this.Screen.X;
            this.Viewport.Y = this.Screen.Y;
            this.Viewport.Width = this.Screen.Width;
            this.Viewport.Height = this.Screen.Height;
        }