home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-09-28 | 1.6 KB | 66 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "Map"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
- Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
- 'local variable(s) to hold property value(s)
- Private mvarItem() As Tile 'local copy
-
- Private CurrentTiles As Integer
- 'local variable(s) to hold property value(s)
- Private mvarRows As Integer 'local copy
- Private mvarCols As Integer 'local copy
-
- Public Property Get Cols() As Integer
- Cols = mvarCols
- End Property
-
- Public Property Get Rows() As Integer
- Rows = mvarRows
- End Property
-
- Public Sub AddItem(I1 As Integer, Optional MovementFactor As Integer)
- Set mvarItem(CurrentTiles) = New Tile
- mvarItem(CurrentTiles).Image = I1
-
- CurrentTiles = CurrentTiles + 1
- End Sub
-
- Public Sub CreateArray(row As Integer, col As Integer)
- ReDim mvarItem(col * row)
- mvarRows = row
- mvarCols = col
- CurrentTiles = 0
- End Sub
-
- Public Property Set Item(Index As Integer, vData As Tile)
- Set mvarItem(Index) = vData
- End Property
-
- Public Property Get Item(Index As Integer) As Tile
- Attribute Item.VB_UserMemId = 0
- If Index > UBound(mvarItem) Then
- Set Item = Nothing
- Else
- Set Item = mvarItem(Index)
- End If
- End Property
-
- Public Sub ClearArray()
- For i = 0 To UBound(mvarItem)
- Set mvarItem(i) = New Tile
- Next
- End Sub
-
-
-