所以我将数据框放入数组中,但是当我运行程序时,我得到NullReferenceExecption
未处理的错误。
Dim ground(5) As PictureBox
ground(0) = Ground1
ground(1) = Ground2
ground(2) = Ground3
ground(3) = Ground4
ground(4) = Ground5
ground(5) = Ground6
然后在计时器中,
For ss = 0 To 4
If StopH.Bounds.IntersectsWith(ground(ss).Bounds) Or CrouchH.Bounds.IntersectsWith(ground(ss).Bounds) Or JumpH.Bounds.IntersectsWith(ground(ss).Bounds) Or RunningH.Bounds.IntersectsWith(ground(ss).Bounds) Then
End If
Next