Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 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 Level1
  10. {
  11. private GameEngine GAME_ENGINE;
  12. int xPos;
  13. int yPos;
  14. private Button m_hint1;
  15. private Button m_hint2;
  16. private Bitmap m_BMPGarage = null;
  17. private Bitmap Hint1 = null;
  18. private Bitmap Hint2 = null;
  19. bool hint_1 = false;
  20. bool hint_2 = false;
  21. //Constructor
  22. public Level1()
  23. {
  24. GAME_ENGINE = GameEngine.GetInstance();
  25. }
  26. public void Level1Start()
  27. {
  28. m_hint1 = new Button(hint1, "", 400, 760, 30, 30);
  29. m_hint2 = new Button(hint2, "", 490, 440, 30, 30);
  30. m_BMPGarage = new Bitmap("Garage1.png");
  31. Hint1 = new Bitmap("Hint1.png");
  32. Hint2 = new Bitmap("Hint2.png");
  33. }
  34. public void Level1End()
  35. {
  36. m_BMPGarage.Dispose();
  37. }
  38. public void Level1Update(Movement _xy)
  39. {
  40. xPos = _xy._x;
  41. yPos = _xy._y;
  42. if (xPos >= 1000)
  43. {
  44. xPos = 200;
  45. }
  46. }
  47. public void Level1Paint()
  48. {
  49. GAME_ENGINE.DrawBitmap(m_BMPGarage, 0, 0);
  50. if (hint_1 == true)
  51. {
  52. GAME_ENGINE.DrawBitmap(Hint1, 500, 250);
  53. }
  54. if (hint_2 == true)
  55. {
  56. GAME_ENGINE.DrawBitmap(Hint2, 500, 250);
  57. }
  58. }
  59. private void hint2()
  60. {
  61. hint_2 = !hint_2;
  62. }
  63. private void hint1()
  64. {
  65. hint_1 = !hint_1;
  66. }
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement