09-01-2023, 09:42 AM
(09-01-2023, 09:28 AM)bplus Wrote:Thanks bplus(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
Help.
thank you.
Needed to end with [/code]