Hi,
I am making a 2d side scrolling game and the basic idea is that you are flying arround with your character
and at the ground there are enemies shooting bullets to the top of the form. I made a class that makes the bullets from
a picturebox. This is how the class looks like:
Public class Enemy
inherits picturebox
Public sub New()
With Me
.Size = New Size(10,10)
.Location = Form1.PicEnemy.Location
.Backcolor = color.black
End With
End sub
Public Sub Move()
Me.top -=3
Me.left -=3
End Sub
End class
Sorry for the messed up colors.
As you can see I can only add 1 'starting' location (the orange line). My question is, if it is possible to
make all enemies use this class to shoot bullets so with extra locations without making hundreds of classes for every enemy or
is this impossible to do?
I hope someone can help me!
thanks in advance
I am making a 2d side scrolling game and the basic idea is that you are flying arround with your character
and at the ground there are enemies shooting bullets to the top of the form. I made a class that makes the bullets from
a picturebox. This is how the class looks like:
Public class Enemy
inherits picturebox
Public sub New()
With Me
.Size = New Size(10,10)
.Location = Form1.PicEnemy.Location
.Backcolor = color.black
End With
End sub
Public Sub Move()
Me.top -=3
Me.left -=3
End Sub
End class
Sorry for the messed up colors.
As you can see I can only add 1 'starting' location (the orange line). My question is, if it is possible to
make all enemies use this class to shoot bullets so with extra locations without making hundreds of classes for every enemy or
is this impossible to do?
I hope someone can help me!
thanks in advance
Last edited: