我建了個從image1陣列,是從0~17的,用來當做遊戲的子彈
imgSpirit是代表飛機,以下是部分程式碼........
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeySpace
isdown = True
isfire = True
If isfire = True Then start = imgSpirit.Left + imgSpirit.Width / 2
n = n + 1
End Select
End Sub
===========================================================
Private Sub tmrAni_Timer()
If isdown = True Then '是否按了發射飛彈事件
If isfire = True Then
Image1.Item(n).Move start, imgSpirit.Top
Image1.Item(n).Visible = True
isfire = False
End If
isdown = False
End If
Image1.Item(n).Top = Image1.Item(n).Top - 2
End Sub
請問該要加些什麼程式碼,才能使之前每個發射出去的飛彈都能
持續前進,多謝