TiledLib.Camera.Camera C# (CSharp) Method

Camera() public method

public Camera ( int width, int height, int boundswidth, int boundsheight ) : System
width int
height int
boundswidth int
boundsheight int
return System
        public Camera(int width, int height, int boundswidth, int boundsheight)
        {
            Instance = this;

            Position = new Vector2(0, 0);
            Width = width;
            Height = height;
            BoundsWidth = boundswidth;
            BoundsHeight = boundsheight;

            ClampRect = new Rectangle((Width / 2), (Height / 2), (boundswidth) - (Width / 2), (boundsheight) - (Height / 2));

            // Set initial position and target
            Position.X = ClampRect.X;
            Position.Y = ClampRect.Y;
            Target = new Vector2(ClampRect.X, ClampRect.Y);
        }

Same methods

Camera::Camera ( int width, int height, Map map ) : System