creating a simple jet flight game with visual studio ..need help..

Updated on August 31, 2017 in  [G] Say Hello!
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on August 31, 2017

just new in coding to make a simple windows form program which spawns automatically enemys from up to down of the screen(like the game Raiden)

so i follow a tutorial here 

http://www.mooict.com/wp-content/uploads/2016/07/create-a-fighter-jet-game-tutorial-mooict2.pdf

how can i spawn many random enemys falling down in the screen (using picturebox and timer) and also make them have different images from my properties.resourses?

besides i could only make one bullet at a time, is there a way to spawn a bullet by entering spacebar?

if someone could help, i would be so grateful. 🙂

  • Liked by
Reply
0 on August 31, 2017

now i’m trying to make a method which create a new pictureBox while running the program, but it doesn’t apper any images, why is that?

and here is the picture

https://gifyu.com/image/z1SH

and here is the code:

namespace WindowsFormsApplication2
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
 public PictureBox GetPictureBoxClone()
 {
 PictureBox pb = new PictureBox();
//Copy properties 
 pb.Size = enemy.Size;
 pb.BackColor = enemy.BackColor;
 pb.BackgroundImage = enemy.BackgroundImage;
 pb.Location = new Point(200, 300);
 pb.Visible = true;
 return pb;
 }
private void button1_Click(object sender, EventArgs e)
 {
 GetPictureBoxClone();
 }
}
}
  • Liked by
Reply
Cancel