Example #1
0
        public Scene(SceneManager manager, string cameraName, float camX, float camY)
        {
            parent = manager;

            cam = new Camera(cameraName, new Vector2(camX, camY));

            entering = false;
            leaving = false;
            Cam.TargetPosition = new Vector2(camX, camY);
            Cam.TargetZoom = Cam.Zoom;
            Cam.SetViewport(parent.BackBufferWidth, parent.BackBufferHeight);
            Cam.SetZoomCentreOffset(0, 0);
            Cam.SetZoomCentreTarget(0, 0);
        }
Example #2
0
 //private int viewportWidth, viewportHeight;
 //private Vector3 viewport;
 //public Vector3 Viewport
 //{
 //    get { return viewport; }
 //    set { viewport = value; }
 //}
 private CameraManager()
 {
     defaultCamera = new Camera("default", Vector2.Zero);
     defaultCamera.Position = Vector2.Zero;
 }