📄 gform.frm
字号:
VERSION 5.00
Begin VB.Form GForm
BorderStyle = 3 'Fixed Dialog
Caption = "Stick Men 2"
ClientHeight = 5004
ClientLeft = 120
ClientTop = 360
ClientWidth = 5940
Icon = "GForm.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5004
ScaleWidth = 5940
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Timer MoveT
Enabled = 0 'False
Interval = 250
Left = 1680
Top = 120
End
Begin VB.PictureBox PB
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
ClipControls = 0 'False
ForeColor = &H80000008&
Height = 1332
Left = 120
ScaleHeight = 111
ScaleMode = 3 'Pixel
ScaleWidth = 111
TabIndex = 0
Top = 0
Visible = 0 'False
Width = 1332
End
Begin VB.Image PausedL
Height = 492
Left = 3720
Stretch = -1 'True
Top = 3960
Visible = 0 'False
Width = 1452
End
Begin VB.Image NMEalertpic
Height = 612
Index = 3
Left = 1680
Top = 2760
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEPic
Height = 612
Index = 3
Left = 2400
Top = 2760
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEangryPic
Height = 612
Index = 3
Left = 3120
Top = 2760
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEconfusedPic
Height = 612
Index = 3
Left = 3840
Top = 2760
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEalertpic
Height = 612
Index = 2
Left = 1680
Top = 2040
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEPic
Height = 612
Index = 2
Left = 2400
Top = 2040
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEangryPic
Height = 612
Index = 2
Left = 3120
Top = 2040
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEconfusedPic
Height = 612
Index = 2
Left = 3840
Top = 2040
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEalertpic
Height = 612
Index = 1
Left = 1680
Top = 1320
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEPic
Height = 612
Index = 1
Left = 2400
Top = 1320
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEangryPic
Height = 612
Index = 1
Left = 3120
Top = 1320
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEconfusedPic
Height = 612
Index = 1
Left = 3840
Top = 1320
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEconfusedPic
Height = 612
Index = 0
Left = 3840
Top = 600
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEangryPic
Height = 612
Index = 0
Left = 3120
Top = 600
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEPic
Height = 612
Index = 0
Left = 2400
Top = 600
Visible = 0 'False
Width = 612
End
Begin VB.Image PowerPic
Height = 612
Left = 240
Top = 3600
Visible = 0 'False
Width = 612
End
Begin VB.Image BonePic
Height = 612
Left = 240
Top = 2880
Visible = 0 'False
Width = 612
End
Begin VB.Image NMEalertpic
Height = 612
Index = 0
Left = 1680
Top = 600
Visible = 0 'False
Width = 612
End
Begin VB.Image ManPic
Height = 612
Left = 240
Top = 2160
Visible = 0 'False
Width = 612
End
Begin VB.Image FloorPic
Height = 612
Left = 240
Top = 4320
Visible = 0 'False
Width = 612
End
Begin VB.Image WallPic
Height = 612
Left = 240
Top = 1440
Visible = 0 'False
Width = 612
End
Begin VB.Image Display
BorderStyle = 1 'Fixed Single
Height = 1260
Left = 3360
Stretch = -1 'True
Top = 3600
Width = 2196
End
Begin VB.Menu File
Caption = "&File"
Begin VB.Menu StartGame
Caption = "&Start Game"
End
Begin VB.Menu Line1
Caption = "-"
End
Begin VB.Menu LevelDesigner
Caption = "&Level Designer"
End
Begin VB.Menu Line2
Caption = "-"
End
Begin VB.Menu Xit
Caption = "E&xit"
End
End
Begin VB.Menu Help
Caption = "&Help"
Begin VB.Menu Instructions
Caption = "&Instructions"
End
Begin VB.Menu About
Caption = "&About"
End
End
End
Attribute VB_Name = "GForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim picMan(0 To 3, 0 To 3) As IPictureDisp
Dim picBone(0 To 3) As IPictureDisp
Private Sub About_Click()
AboutForm.Visible = True
End Sub
Private Sub File_Click()
MoveT.Enabled = False
PausedL.Visible = True
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Maze.Object(Man.x, Man.y) = NOWT
Select Case KeyCode
Case vbKeyP
If MoveT.Enabled Then
MoveT.Enabled = False
PausedL.Visible = True
Else
PausedL.Visible = False
MoveT.Enabled = True
End If
Case vbKeyUp
If MoveT.Enabled = False Then GoTo SkipIt
If Man.dir = dUP Then
Select Case Maze.Object(Man.x, Man.y - 1)
Case NOWT
Man.y = Man.y - 1
Case BONE
sndPlaySound App.Path & "\Resources\Sounds\pop.wav", &H1
Maze.BoneCount = Maze.BoneCount - 1
If Maze.BoneCount = 0 Then LevelComplete: Exit Sub
Man.y = Man.y - 1
Caption = "Haunted Maze 2 - " & Maze.BoneCount & " bones left to collect"
End Select
Else
Man.dir = dUP
End If
Case vbKeyDown
If MoveT.Enabled = False Then GoTo SkipIt
If Man.dir = dDOWN Then
Select Case Maze.Object(Man.x, Man.y + 1)
Case NOWT
Man.y = Man.y + 1
Case BONE
sndPlaySound App.Path & "\Resources\Sounds\pop.wav", &H1
Maze.BoneCount = Maze.BoneCount - 1
If Maze.BoneCount = 0 Then LevelComplete: Exit Sub
Man.y = Man.y + 1
Caption = "Haunted Maze 2 - " & Maze.BoneCount & " bones left to collect"
End Select
Else
Man.dir = dDOWN
End If
Case vbKeyLeft
If MoveT.Enabled = False Then GoTo SkipIt
If Man.dir = dLEFT Then
Select Case Maze.Object(Man.x - 1, Man.y)
Case NOWT
Man.x = Man.x - 1
Case BONE
sndPlaySound App.Path & "\Resources\Sounds\pop.wav", &H1
Maze.BoneCount = Maze.BoneCount - 1
If Maze.BoneCount = 0 Then LevelComplete: Exit Sub
Man.x = Man.x - 1
Caption = "Haunted Maze 2 - " & Maze.BoneCount & " bones left to collect"
End Select
Else
Man.dir = dLEFT
End If
Case vbKeyRight
If MoveT.Enabled = False Then GoTo SkipIt
If Man.dir = dRIGHT Then
Select Case Maze.Object(Man.x + 1, Man.y)
Case NOWT
Man.x = Man.x + 1
Case BONE
sndPlaySound App.Path & "\Resources\Sounds\pop.wav", &H1
Maze.BoneCount = Maze.BoneCount - 1
If Maze.BoneCount = 0 Then LevelComplete: Exit Sub
Man.x = Man.x + 1
Caption = "Haunted Maze 2 - " & Maze.BoneCount & " bones left to collect"
End Select
Else
Man.dir = dRIGHT
End If
End Select
SkipIt:
sndPlaySound App.Path & "\Resources\Sounds\step" & Man.Frame & ".wav", &H1
Man.Frame = Man.Frame + 1
If Man.Frame = 4 Then Man.Frame = 0
ManPic = picMan(Man.dir, Man.Frame)
Maze.Object(Man.x, Man.y) = COOLMAN
End Sub
Sub LevelComplete()
MoveT.Enabled = False
sndPlaySound App.Path & "\Resources\Sounds\complete.wav", &H2
Display = LoadPicture()
UnloadMaze
End Sub
Private Sub Form_Load()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -