Zdravím všeci odborníky, mám tady dilema mám docela dlouhý kód. Jedná se o tankovou hru kde jsou dva tanky, výstřeli se mohou zabít. Vše vcelku funguje až na to že nelze hrát oběma tanky zároveň kulka tankem proletí. Uměl by mě někdo pomoc s kodem? Děkuji moc.
Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Vybuch = New System.Windows.Forms.PictureBox()
Me.Kulkavlevo = New System.Windows.Forms.PictureBox()
Me.Kulkavpravo = New System.Windows.Forms.PictureBox()
Me.Kulkadolu = New System.Windows.Forms.PictureBox()
Me.Kulkanahoru = New System.Windows.Forms.PictureBox()
Me.Kulka = New System.Windows.Forms.PictureBox()
Me.Tank1 = New System.Windows.Forms.PictureBox()
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
Me.Tankvpravo = New System.Windows.Forms.PictureBox()
Me.Tankvlevo = New System.Windows.Forms.PictureBox()
Me.Tankdolu = New System.Windows.Forms.PictureBox()
Me.Tanknahoru = New System.Windows.Forms.PictureBox()
Me.Tank2 = New System.Windows.Forms.PictureBox()
Me.Tank2nahoru = New System.Windows.Forms.PictureBox()
Me.Tank2dolu = New System.Windows.Forms.PictureBox()
Me.Tank2vpravo = New System.Windows.Forms.PictureBox()
Me.Tank2vlevo = New System.Windows.Forms.PictureBox()
CType(Me.Vybuch, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Kulkavlevo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Kulkavpravo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Kulkadolu, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Kulkanahoru, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Kulka, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tankvpravo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tankvlevo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tankdolu, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tanknahoru, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank2nahoru, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank2dolu, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank2vpravo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Tank2vlevo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Timer1
'
Me.Timer1.Interval = 25
'
'Vybuch
'
Me.Vybuch.Image = Global.Tanky.My.Resources.Resources.vybuch
Me.Vybuch.Location = New System.Drawing.Point(35, 280)
Me.Vybuch.Name = "Vybuch"
Me.Vybuch.Size = New System.Drawing.Size(21, 20)
Me.Vybuch.TabIndex = 10
Me.Vybuch.TabStop = False
Me.Vybuch.Visible = False
'
'Kulkavlevo
'
Me.Kulkavlevo.Image = Global.Tanky.My.Resources.Resources.Tankkulkavlevo
Me.Kulkavlevo.Location = New System.Drawing.Point(35, 232)
Me.Kulkavlevo.Name = "Kulkavlevo"
Me.Kulkavlevo.Size = New System.Drawing.Size(14, 10)
Me.Kulkavlevo.TabIndex = 9
Me.Kulkavlevo.TabStop = False
Me.Kulkavlevo.Visible = False
'
'Kulkavpravo
'
Me.Kulkavpravo.Image = Global.Tanky.My.Resources.Resources.Tankkulkavpravo
Me.Kulkavpravo.Location = New System.Drawing.Point(35, 259)
Me.Kulkavpravo.Name = "Kulkavpravo"
Me.Kulkavpravo.Size = New System.Drawing.Size(18, 15)
Me.Kulkavpravo.TabIndex = 8
Me.Kulkavpravo.TabStop = False
Me.Kulkavpravo.Visible = False
'
'Kulkadolu
'
Me.Kulkadolu.Image = Global.Tanky.My.Resources.Resources.Tankkulkadolu
Me.Kulkadolu.Location = New System.Drawing.Point(35, 214)
Me.Kulkadolu.Name = "Kulkadolu"
Me.Kulkadolu.Size = New System.Drawing.Size(18, 15)
Me.Kulkadolu.TabIndex = 7
Me.Kulkadolu.TabStop = False
Me.Kulkadolu.Visible = False
'
'Kulkanahoru
'
Me.Kulkanahoru.Image = Global.Tanky.My.Resources.Resources.Tankkulkanahoru
Me.Kulkanahoru.Location = New System.Drawing.Point(35, 196)
Me.Kulkanahoru.Name = "Kulkanahoru"
Me.Kulkanahoru.Size = New System.Drawing.Size(21, 15)
Me.Kulkanahoru.TabIndex = 6
Me.Kulkanahoru.TabStop = False
Me.Kulkanahoru.Visible = False
'
'Kulka
'
Me.Kulka.Image = Global.Tanky.My.Resources.Resources.Tankkulka
Me.Kulka.Location = New System.Drawing.Point(35, 306)
Me.Kulka.Name = "Kulka"
Me.Kulka.Size = New System.Drawing.Size(21, 20)
Me.Kulka.TabIndex = 5
Me.Kulka.TabStop = False
Me.Kulka.Visible = False
'
'Tank1
'
Me.Tank1.Image = Global.Tanky.My.Resources.Resources.tank
Me.Tank1.Location = New System.Drawing.Point(211, 99)
Me.Tank1.Name = "Tank1"
Me.Tank1.Size = New System.Drawing.Size(39, 35)
Me.Tank1.TabIndex = 0
Me.Tank1.TabStop = False
'
'Timer2
'
Me.Timer2.Interval = 400
'
'Tankvpravo
'
Me.Tankvpravo.Image = Global.Tanky.My.Resources.Resources.tankvpravo
Me.Tankvpravo.Location = New System.Drawing.Point(35, 131)
Me.Tankvpravo.Name = "Tankvpravo"
Me.Tankvpravo.Size = New System.Drawing.Size(32, 27)
Me.Tankvpravo.TabIndex = 11
Me.Tankvpravo.TabStop = False
Me.Tankvpravo.Visible = False
'
'Tankvlevo
'
Me.Tankvlevo.Image = Global.Tanky.My.Resources.Resources.tankvlevo
Me.Tankvlevo.Location = New System.Drawing.Point(35, 99)
Me.Tankvlevo.Name = "Tankvlevo"
Me.Tankvlevo.Size = New System.Drawing.Size(32, 26)
Me.Tankvlevo.TabIndex = 12
Me.Tankvlevo.TabStop = False
Me.Tankvlevo.Visible = False
'
'Tankdolu
'
Me.Tankdolu.Image = Global.Tanky.My.Resources.Resources.tankdolu
Me.Tankdolu.Location = New System.Drawing.Point(35, 61)
Me.Tankdolu.Name = "Tankdolu"
Me.Tankdolu.Size = New System.Drawing.Size(26, 32)
Me.Tankdolu.TabIndex = 13
Me.Tankdolu.TabStop = False
Me.Tankdolu.Visible = False
'
'Tanknahoru
'
Me.Tanknahoru.Image = Global.Tanky.My.Resources.Resources.tanknahoru
Me.Tanknahoru.Location = New System.Drawing.Point(35, 23)
Me.Tanknahoru.Name = "Tanknahoru"
Me.Tanknahoru.Size = New System.Drawing.Size(27, 32)
Me.Tanknahoru.TabIndex = 14
Me.Tanknahoru.TabStop = False
Me.Tanknahoru.Visible = False
'
'Tank2
'
Me.Tank2.Image = Global.Tanky.My.Resources.Resources.tank2
Me.Tank2.Location = New System.Drawing.Point(553, 359)
Me.Tank2.Name = "Tank2"
Me.Tank2.Size = New System.Drawing.Size(39, 35)
Me.Tank2.TabIndex = 15
Me.Tank2.TabStop = False
'
'Tank2nahoru
'
Me.Tank2nahoru.Image = Global.Tanky.My.Resources.Resources.tank2nahoru
Me.Tank2nahoru.Location = New System.Drawing.Point(740, 115)
Me.Tank2nahoru.Name = "Tank2nahoru"
Me.Tank2nahoru.Size = New System.Drawing.Size(27, 32)
Me.Tank2nahoru.TabIndex = 16
Me.Tank2nahoru.TabStop = False
Me.Tank2nahoru.Visible = False
'
'Tank2dolu
'
Me.Tank2dolu.Image = Global.Tanky.My.Resources.Resources.tank2dolu
Me.Tank2dolu.Location = New System.Drawing.Point(735, 45)
Me.Tank2dolu.Name = "Tank2dolu"
Me.Tank2dolu.Size = New System.Drawing.Size(27, 32)
Me.Tank2dolu.TabIndex = 17
Me.Tank2dolu.TabStop = False
Me.Tank2dolu.Visible = False
'
'Tank2vpravo
'
Me.Tank2vpravo.Image = Global.Tanky.My.Resources.Resources.tank2vpravo
Me.Tank2vpravo.Location = New System.Drawing.Point(735, 83)
Me.Tank2vpravo.Name = "Tank2vpravo"
Me.Tank2vpravo.Size = New System.Drawing.Size(32, 26)
Me.Tank2vpravo.TabIndex = 18
Me.Tank2vpravo.TabStop = False
Me.Tank2vpravo.Visible = False
'
'Tank2vlevo
'
Me.Tank2vlevo.Image = Global.Tanky.My.Resources.Resources.tank2vlevo
Me.Tank2vlevo.Location = New System.Drawing.Point(735, 153)
Me.Tank2vlevo.Name = "Tank2vlevo"
Me.Tank2vlevo.Size = New System.Drawing.Size(32, 27)
Me.Tank2vlevo.TabIndex = 19
Me.Tank2vlevo.TabStop = False
Me.Tank2vlevo.Visible = False
'
'Form2
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(790, 497)
Me.Controls.Add(Me.Tank2vlevo)
Me.Controls.Add(Me.Tank2vpravo)
Me.Controls.Add(Me.Tank2dolu)
Me.Controls.Add(Me.Tank2nahoru)
Me.Controls.Add(Me.Tank2)
Me.Controls.Add(Me.Tanknahoru)
Me.Controls.Add(Me.Tankdolu)
Me.Controls.Add(Me.Tankvlevo)
Me.Controls.Add(Me.Tankvpravo)
Me.Controls.Add(Me.Vybuch)
Me.Controls.Add(Me.Kulkavlevo)
Me.Controls.Add(Me.Kulkavpravo)
Me.Controls.Add(Me.Kulkadolu)
Me.Controls.Add(Me.Kulkanahoru)
Me.Controls.Add(Me.Kulka)
Me.Controls.Add(Me.Tank1)
Me.Name = "Form2"
Me.Text = "Tanky"
CType(Me.Vybuch, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Kulkavlevo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Kulkavpravo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Kulkadolu, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Kulkanahoru, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Kulka, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tankvpravo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tankvlevo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tankdolu, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tanknahoru, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank2nahoru, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank2dolu, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank2vpravo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Tank2vlevo, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents Tank1 As System.Windows.Forms.PictureBox
Friend WithEvents Kulka As System.Windows.Forms.PictureBox
Friend WithEvents Kulkanahoru As System.Windows.Forms.PictureBox
Friend WithEvents Kulkadolu As System.Windows.Forms.PictureBox
Friend WithEvents Kulkavpravo As System.Windows.Forms.PictureBox
Friend WithEvents Kulkavlevo As System.Windows.Forms.PictureBox
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents Vybuch As System.Windows.Forms.PictureBox
Friend WithEvents Timer2 As System.Windows.Forms.Timer
Friend WithEvents Tankvpravo As System.Windows.Forms.PictureBox
Friend WithEvents Tankvlevo As System.Windows.Forms.PictureBox
Friend WithEvents Tankdolu As System.Windows.Forms.PictureBox
Friend WithEvents Tanknahoru As System.Windows.Forms.PictureBox
Friend WithEvents Tank2 As System.Windows.Forms.PictureBox
Friend WithEvents Tank2nahoru As System.Windows.Forms.PictureBox
Friend WithEvents Tank2dolu As System.Windows.Forms.PictureBox
Friend WithEvents Tank2vpravo As System.Windows.Forms.PictureBox
Friend WithEvents Tank2vlevo As System.Windows.Forms.PictureBox
End Class