Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace GameEngine
  8. {
  9. class Level2
  10. {
  11. private GameEngine GAME_ENGINE;
  12. private Button m_bord;
  13. private Button Een;
  14. private Button Twee;
  15. private Button Drie;
  16. private Button Vier;
  17. private Button Vijf;
  18. private Button Zes;
  19. private Button Zeven;
  20. private Button Acht;
  21. private Button Negen;
  22. private Button Reset;
  23. int Oplossing;
  24. private Bitmap m_BMPGarageLanceer = null;
  25. private Bitmap m_paneel = null;
  26. private Bitmap m_door = null;
  27. bool bord = false;
  28. //Constructor
  29. public Level2()
  30. {
  31. GAME_ENGINE = GameEngine.GetInstance();
  32. }
  33. public void Level2Start()
  34. {
  35. m_bord = new Button(m_Bord, "button", 790, 295, 80, 70);
  36. Een = new Button(een, "", 430, 100, 75, 100);
  37. Twee = new Button(twee, "", 740, 100, 75, 100);
  38. Drie = new Button(drie, "", 1100, 100, 75, 100);
  39. Vier = new Button(vier, "", 400, 250, 75, 100);
  40. Vijf = new Button(vijf, "", 730, 250, 75, 100);
  41. Zes = new Button(zes, "", 1090, 250, 75, 100);
  42. Zeven = new Button(zeven, "", 410, 390, 75, 100);
  43. Acht = new Button(acht, "", 730, 390, 75, 100);
  44. Negen = new Button(negen, "", 1080, 390, 75, 100);
  45. m_paneel = new Bitmap("Bord.png");
  46. m_BMPGarageLanceer = new Bitmap("GarageLanceer.png");
  47. m_door = new Bitmap("DoorUnlocked.png");
  48. }
  49. public void Level2End()
  50. {
  51. m_BMPGarageLanceer.Dispose();
  52. m_paneel.Dispose();
  53. }
  54. public void Level2Update()
  55. {
  56. Console.WriteLine("" + Oplossing);
  57.  
  58. }
  59. public void Level2Paint()
  60. {
  61.  
  62. GAME_ENGINE.DrawBitmap(m_BMPGarageLanceer, 0, 0);
  63.  
  64. if (bord == true)
  65. {
  66. GAME_ENGINE.DrawBitmap(m_paneel, 0, 0);
  67. }
  68. if (Oplossing == 10)
  69. {
  70. GAME_ENGINE.DrawBitmap(m_door, 0, 0);
  71. }
  72. }
  73. public void m_Bord()
  74. {
  75. bord = !bord;
  76. }
  77. public void een()
  78. {
  79. Oplossing = Oplossing + 1;
  80. }
  81. public void twee()
  82. {
  83. Oplossing = Oplossing + 2;
  84. }
  85. public void drie()
  86. {
  87. Oplossing = Oplossing + 3;
  88. }
  89. public void vier()
  90. {
  91. Oplossing = Oplossing + 4;
  92. }
  93. public void vijf()
  94. {
  95. Oplossing = Oplossing + 5;
  96. }
  97. public void zes()
  98. {
  99. Oplossing = Oplossing + 6;
  100. }
  101. public void zeven()
  102. {
  103. Oplossing = Oplossing + 7;
  104. }
  105. public void acht()
  106. {
  107. Oplossing = Oplossing + 8;
  108. }
  109. public void negen()
  110. {
  111. Oplossing = Oplossing + 9;
  112. }
  113. }
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement