Public Sub New(ByVal width As Integer, ByVal height As Integer, ByVal terrain As Integer)
Dim x As Integer
Dim y As Integer
Me.Width = width
Me.Height = height
ReDim Me.Tiles(width, height)
For x = 0 To width
For y = 0 To height
If Percentage() > 20 Then
Me.Tiles(x, y).Sector = Sector_Types.FIELD
Else
Me.Tiles(x, y).Sector = Sector_Types.WALL
End If
Me.Tiles(x, y).Walkable = Walkable(Me.Tiles(x, y).Sector)
Me.Tiles(x, y).Image = TileImage(Me.Tiles(x, y).Sector)
Next
Next
End Sub
And it is called here:
Dim mapTest As Map = New Map(10, 10, 1)
If this is not clear or not enough code is given please let me know and I can elaborate further.

New Topic/Question
Reply




MultiQuote





|