Time for action – the Camera module
Create a new module
Camera
in the Tile Engine project.Modify the declaration of the
Camera
module to make it public:Public Module Camera
Add declarations to the
Camera
module:#Region "Declarations" Private _position As Vector2 = Vector2.Zero Private _viewPortSize As Vector2 = Vector2.Zero #End Region
Add properties to the
Camera
module:#Region "Properties" Public Property WorldRectangle As Rectangle = New Rectangle(0, 0, 0, 0) Public Property ViewPortWidth As Integer Get Return CInt(Int(_viewPortSize.X)) End Get Set(ByVal value As Integer) _viewPortSize.X = value End Set End Property Public Property ViewPortHeight As Integer Get Return CInt(Int(_viewPortSize.Y)) End Get Set(ByVal value As Integer) _viewPortSize.Y = value End Set End Property Public Property Position As Vector2 Get Return _position End Get Set(ByVal value As Vector2) _position = New Vector2...