CrisisAtSwissStation.ScrollingWorld.getCameraCoords C# (CSharp) Method

getCameraCoords() public method

public getCameraCoords ( ) : Vector2
return Vector2
        public Vector2 getCameraCoords()
        {
            if (dude.Position.X * CASSWorld.SCALE <= SCREEN_WIDTH / 2)
            {
                return new Vector2(0, 0);
            }
            else if (dude.Position.X * CASSWorld.SCALE >= gameLevelWidth - SCREEN_WIDTH / 2)
            {
                return new Vector2((-gameLevelWidth + (SCREEN_WIDTH)), 0);
            }
            else
            {
                return new Vector2(-dude.Position.X * CASSWorld.SCALE + (SCREEN_WIDTH / 2), 0);
            }
        }