Private Sub Timer1_Timer()
Dim Lines As Integer
falling1 = Block1.Fall(Window1)
If Not falling1 Then
Lines = DetectWnd(Window1)
If Lines > 0 Then
Lines1 = Lines1 + Lines
Select Case Lines
Case 1
Score1 = Score1 + 100
Case 2
Score1 = Score1 + 300
Case 3
Score1 = Score1 + 700
Case 4
Score1 = Score1 + 1500
Case Else
End Select
Timer1.Interval = 500 - (Score1 \ 5000) * 50
Speed1 = Score1 \ 5000
lblspeed1.Caption = Str(Speed1)
lblline.Caption = Str(Lines1)
lblScore.Caption = Str(Score1)
If FIGHTMODE And Lines > 1 Then
If falling2 Then Block2.Hide Window2
InsertLine Window2, Block1, Lines - 1
End If
End If
If Block1.Top = -2 Then ' The Game is Over lblGame.Visible = True
lblOver.Visible = True
Timer1.Enabled = False
ClearWindow Next1
If Score1 > TOPSCORE Then 'The record was broken
TOPNAME = InputBox("恭喜你已成为第一高手,请输入大名", "Block")
TOPSCORE = Score1
End If
If FIGHTMODE Then
Timer2 = False
End If
Else
falling1 = True
Block1.Init Next1, Cheating1
Cheating1 = False
End If
End If
End SubPrivate Sub Timer2_Timer()
Dim Lines As Integer
falling2 = Block2.Fall(Window2)
If Not falling2 Then
Lines = DetectWnd(Window2)
If Lines > 0 Then
Lines2 = Lines2 + Lines
Select Case Lines
Case 1
Score2 = Score2 + 100
Case 2
Score2 = Score2 + 300
Case 3
Score2 = Score2 + 700
Case 4
Score2 = Score2 + 1500
Case Else
End Select
Timer2.Interval = 500 - (Score2 \ 5000) * 50
Speed2 = Score2 \ 5000
lblspeed2.Caption = Str(Speed2)
lblline2.Caption = Str(Lines2)
lblscore2.Caption = Str(Score2)
If FIGHTMODE And Lines > 1 Then
If falling1 Then Block1.Hide Window1
InsertLine Window1, Block2, Lines - 1
End If
End If
If Block2.Top = -2 Then 'Game Over
lblGame2.Visible = True
lblOver2.Visible = True
Timer2.Enabled = False
ClearWindow Next2
If Score2 > TOPSCORE Then 'The record was broken
TOPSCORE = Score2
TOPNAME = InputBox("恭喜你已成为第一高手,请输入大名", "高手!", TOPNAME)
End If
If FIGHTMODE Then
Timer1 = False
End If
Else
falling2 = True
Block2.Init Next2, Cheating2
Cheating2 = False
End If
End If
End Sub
Dim Lines As Integer
falling1 = Block1.Fall(Window1)
If Not falling1 Then
Lines = DetectWnd(Window1)
If Lines > 0 Then
Lines1 = Lines1 + Lines
Select Case Lines
Case 1
Score1 = Score1 + 100
Case 2
Score1 = Score1 + 300
Case 3
Score1 = Score1 + 700
Case 4
Score1 = Score1 + 1500
Case Else
End Select
Timer1.Interval = 500 - (Score1 \ 5000) * 50
Speed1 = Score1 \ 5000
lblspeed1.Caption = Str(Speed1)
lblline.Caption = Str(Lines1)
lblScore.Caption = Str(Score1)
If FIGHTMODE And Lines > 1 Then
If falling2 Then Block2.Hide Window2
InsertLine Window2, Block1, Lines - 1
End If
End If
If Block1.Top = -2 Then ' The Game is Over lblGame.Visible = True
lblOver.Visible = True
Timer1.Enabled = False
ClearWindow Next1
If Score1 > TOPSCORE Then 'The record was broken
TOPNAME = InputBox("恭喜你已成为第一高手,请输入大名", "Block")
TOPSCORE = Score1
End If
If FIGHTMODE Then
Timer2 = False
End If
Else
falling1 = True
Block1.Init Next1, Cheating1
Cheating1 = False
End If
End If
End SubPrivate Sub Timer2_Timer()
Dim Lines As Integer
falling2 = Block2.Fall(Window2)
If Not falling2 Then
Lines = DetectWnd(Window2)
If Lines > 0 Then
Lines2 = Lines2 + Lines
Select Case Lines
Case 1
Score2 = Score2 + 100
Case 2
Score2 = Score2 + 300
Case 3
Score2 = Score2 + 700
Case 4
Score2 = Score2 + 1500
Case Else
End Select
Timer2.Interval = 500 - (Score2 \ 5000) * 50
Speed2 = Score2 \ 5000
lblspeed2.Caption = Str(Speed2)
lblline2.Caption = Str(Lines2)
lblscore2.Caption = Str(Score2)
If FIGHTMODE And Lines > 1 Then
If falling1 Then Block1.Hide Window1
InsertLine Window1, Block2, Lines - 1
End If
End If
If Block2.Top = -2 Then 'Game Over
lblGame2.Visible = True
lblOver2.Visible = True
Timer2.Enabled = False
ClearWindow Next2
If Score2 > TOPSCORE Then 'The record was broken
TOPSCORE = Score2
TOPNAME = InputBox("恭喜你已成为第一高手,请输入大名", "高手!", TOPNAME)
End If
If FIGHTMODE Then
Timer1 = False
End If
Else
falling2 = True
Block2.Init Next2, Cheating2
Cheating2 = False
End If
End If
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货