I'm trying to move a PictureBox
diagonally in a game I'm making.
private void movebulletupright()
{
//this part is mainly for checking the action[![enter image description here][1]][1]
for (int k = bulletlistupright.Count - 1; k >= 0; k--)
{
bulletlistupright[k].Location.X++;
bulletlistupright[k].Location.Y++;
//This part is just basically meant to get rid of the bullet
//when it reaches the end of the screen
if (bulletlistupright[k].Left >= this.ClientSize.Height)
{
this.Controls.Remove(bulletlistupright[k]);
bulletlistupright.RemoveAt(k);
}
}
}
I'm using a timer to move the bullets. What I would like to do is move the bullet 5 pixel per tick (which is 1 millisecond). if you look at the attached picture below, what i'm trying to do is move those yellow bullet shaped in the corners diagonally.(i only have them there so i can represent where they spawn in). [1]: https://i.stack.imgur.com/wQc5l.png