Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public class Zmayka
  2. {
  3. Image im = Image.FromFile("stoormtroper-star-wars-512.png");
  4. public List<Point> XY { get; set; }
  5. public Zmayka()
  6. {
  7. XY.Add(new Point(50, 50));
  8. XY.Add(new Point(50, 50));
  9. XY.Add(new Point(50, 50));
  10. }
  11. public void Draw(PaintEventArgs e)
  12. {
  13. for (int i = 0; i < XY.Count; i++)
  14. {
  15. e.Graphics.DrawImage(im, XY[i].X, XY[i].Y, 50, 50);
  16.  
  17. }
  18. }
  19. }
  20. public class apple
  21. {
  22. Image im = Image.FromFile("Rebel_icon.png");
  23. public List<Point> xy { get; set; }
  24. public apple()
  25. {
  26. xy.Add(new Point(50, 50));
  27. }
  28. public void Draw(PaintEventArgs e)
  29. {
  30. for (int i = 0; i < xy.Count; i++)
  31. {
  32. e.Graphics.DrawImage(im, xy[i].X, xy[i].Y, 50, 50);
  33.  
  34. }
  35.  
  36. }
  37.  
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement