Time for action – the GoalManager module
Add a new module called
GoalManager
to the Robot Rampage project.Add declarations to the
GoalManager
module:#Region "Declarations" Private _computerTerminals As List(Of ComputerTerminal) = New List(Of ComputerTerminal)() Private _activeCount As Integer = 0 Private _minDistanceFromPlayer As Integer = 250 Private _rand As Random = new Random() Private _texture As Texture2D Private _initialActiveFrame As Rectangle Private _initialDisabledFrame As Rectangle Private _activeFrameCount As Integer Private _disabledFrameCount As Integer #End Region
Add a read-only property to the
GoalManager
module:#Region "Properties" Public ReadOnly Property ActiveTerminals As Integer Get Return _activeCount End Get End Property #End Region
Add the
Initialize()
method to theGoalManager
module:#Region "Initialization" Public Sub Initialize( textureSheet As Texture2D, initialActiveRectangle As Rectangle, initialDisabledRectangle As Rectangle...