Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Goals(1) = New Tile()
#10
(09-01-2023, 09:28 AM)bplus Wrote:
(09-01-2023, 08:49 AM)gaslouk Wrote:
Code: (Select All)
Dim Shared row, col As Integer
Dim Shared levelMap(1 To 12) As String
Dim Shared tileSymbol As String

Sub LoadLabel (numLevel)
    ' Δημιουργία χάρτη του παιχνιδιού
    levelMap(1) = "    ############ "
    levelMap(2) = "    #          # "
    levelMap(3) = "    #          # "
    levelMap(4) = "    #    $$    # "
    levelMap(5) = "    #  $  $  # "
    levelMap(6) = "    #    $$    # "
    levelMap(7) = " ###############"
    levelMap(8) = "#              #"
    levelMap(9) = "#              #"
    levelMap(10) = "#              #"
    levelMap(11) = "#              #"
    levelMap(12) = "############### "

    ' Διασχίστε τον χάρτη και ορίστε τα χαρακτηριστικά των πλακιδίων

    For row = 1 To MapHeight
        For col = 1 To MapWidth
            tileSymbol = MID(levelMap(row), col, 1)

            MapTiles(col, row).Symbol = tileSymbol
            MapTiles(col, row).IsBox = 0
            MapTiles(col, row).IsGoal = 0

            If tileSymbol = "$" Then
                MapTiles(col, row).IsBox = 1
            ElseIf tileSymbol = "." Then
                MapTiles(col, row).IsGoal = 1
            End If
        Next col
    Next row
End Sub

Huh 
Help.

thank you.

Needed to end with [/code]
Thanks  bplus
Reply


Messages In This Thread
Goals(1) = New Tile() - by gaslouk - 08-31-2023, 05:42 PM
RE: Goals(1) = New Tile() - by TerryRitchie - 08-31-2023, 06:08 PM
RE: Goals(1) = New Tile() - by mnrvovrfc - 08-31-2023, 06:58 PM
RE: Goals(1) = New Tile() - by RhoSigma - 08-31-2023, 09:45 PM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 07:07 AM
RE: Goals(1) = New Tile() - by RhoSigma - 09-01-2023, 08:35 AM
RE: Goals(1) = New Tile() - by SMcNeill - 09-01-2023, 07:28 AM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 08:49 AM
RE: Goals(1) = New Tile() - by bplus - 09-01-2023, 09:28 AM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 09:42 AM
RE: Goals(1) = New Tile() - by bplus - 09-01-2023, 09:49 AM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 09:57 AM
RE: Goals(1) = New Tile() - by bplus - 09-01-2023, 10:08 AM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 10:19 AM
RE: Goals(1) = New Tile() - by bplus - 09-01-2023, 11:18 AM
RE: Goals(1) = New Tile() - by gaslouk - 09-01-2023, 01:01 PM
RE: Goals(1) = New Tile() - by bplus - 09-03-2023, 06:39 PM



Users browsing this thread: 2 Guest(s)