【VB开源代码栏目提醒】:网学会员为广大网友收集整理了,frmGame.frm,希望对大家有所帮助!
VERSION 5.00
Begin VB.Form frmGame
BackColor = &H00FF8080&
BorderStyle = 1 'Fixed Single
Caption = "寻宝游戏"
ClientHeight = 6750
ClientLeft = 45
ClientTop = 330
ClientWidth = 7860
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 450
ScaleMode = 3 'Pixel
ScaleWidth = 524
StartUpPosition = 2 'CenterScreen
Begin VB.Frame frameINFO
BackColor = &H00000000&
Height = 1215
Left = 1920
TabIndex = 1
Top = 1680
Visible = 0 'False
Width = 3615
Begin VB.Label lblPrevInfo
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblPrevInfo"
ForeColor = &H0000FFFF&
Height = 255
Left = 120
TabIndex = 5
Top = 240
Width = 3375
End
Begin VB.Label lblInfo
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblInfo"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 345
Left = 120
TabIndex = 2
Top = 510
Width = 3375
End
End
Begin VB.PictureBox picFIELD
AutoRedraw = -1 'True
Height = 930
Left = 90
ScaleHeight = 58
ScaleMode = 3 'Pixel
ScaleWidth = 133
TabIndex = 0
Top = 1350
Width = 2055
End
Begin Boulder_Dash.DigControl DigControl_P2_Lifes
Height = 930
Left = 150
TabIndex = 11
TabStop = 0 'False
Top = 330
Width = 1380
_ExtentX = 2434
_ExtentY = 1640
Caption = "Lifes"
End
Begin Boulder_Dash.DigControl DigControl_P2_Nikud
Height = 930
Left = 1650
TabIndex = 10
TabStop = 0 'False
Top = 330
Width = 1380
_ExtentX = 2434
_ExtentY = 1640
Caption = "Score"
End
Begin Boulder_Dash.DigControl DigControl_Timer
Height = 930
Left = 3375
TabIndex = 9
TabStop = 0 'False
Top = 60
Width = 1380
_ExtentX = 2434
_ExtentY = 1640
Caption = "Timer"
End
Begin Boulder_Dash.DigControl DigControl_Lifes
Height = 930
Left = 4935
TabIndex = 8
TabStop = 0 'False
Top = 330
Width = 1380
_ExtentX = 2434
_ExtentY = 1640
Caption = "Lifes"
End
Begin Boulder_Dash.DigControl DigControl_Nikud
Height = 930
Left = 6405
TabIndex = 7
TabStop = 0 'False
Top = 330
Width = 1380
_ExtentX = 2434
_ExtentY = 1640
Caption = "Score"
End
Begin VB.Timer TimerDestructionCheck
Enabled = 0 'False
Interval = 100
Left = 1320
Top = 3240
End
Begin VB.Timer TimerShniyot
Enabled = 0 'False
Interval = 1000
Left = 3360
Top = 1200
End
Begin
VB.Timer TimerIdarderut
Enabled = 0 'False
Interval = 300
Left = 840
Top = 2760
End
Begin VB.Label lblP2Name
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblP2Name"
BeginProperty Font
Name = "Tahoma"
Size = 9.75
Charset = 177
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Left = 840
TabIndex = 6
Top = 0
Visible = 0 'False
Width = 1560
End
Begin VB.Label lblPlayerName
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblPlayerName"
BeginProperty Font
Name = "Tahoma"
Size = 9.75
Charset = 177
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Left = 5640
TabIndex = 4
Top = 0
Width = 1560
End
Begin VB.Label lblLevel
Alignment = 2 'Center
BackStyle = 0 'Transparent
BeginProperty Font
Name = "Tahoma"
Size = 9.75
Charset = 177
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 3330
TabIndex = 3
Top = 1020
Width = 1455
End
End
Attribute VB_Name = "frmGame"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'
Option Explicit
Const Player2_UP_KEYCODE As Integer = vbKeyE
Const Player2_DOWN_KEYCODE As Integer = vbKeyX
Const Player2_LEFT_KEYCODE As Integer = vbKeyS
Const Player2_RIGHT_KEYCODE As Integer = vbKeyD
' These variables are used to prevent
' immediate check (on the same timer event), of
' object that falls to the right side;
' otherwise it falls to final position to fast.
' This is done only for the right side because the
' loop goes from 0 to MAX and thus the call
' to CHECK_OBJECT_FALL happens immediately.
Dim iSKIP_ON_CURRENT_LOOP_X As Integer
Dim iSKIP_ON_CURRENT_LOOP_Y As Integer
' Should be used to avoid destruction of a man
' when man is moving very quickly (it is only destroyed
' only when it stays on the same place after the
' TimerDestructionCheck event:
Dim iDESTRUCTION_X As Integer
Dim iDESTRUCTION_Y As Integer
Dim sDESTRUCTION_OBJECT As String
' Visible field (currently visible=actual):
Dim col As CollectionRibuim
' This array could be used for future game field
' extention (by making actual field bigger then visible):
Dim
NETUNIM(0 To MAX_COL, 0 To MAX_ROW) As String
' for player 1