Settings.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // Settings.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Text;
  13. using Microsoft.Xna.Framework;
  14. #endregion
  15. namespace MemoryMadness
  16. {
  17. enum ButtonColors
  18. {
  19. Red,
  20. Yellow,
  21. Blue,
  22. Green
  23. }
  24. enum LevelState
  25. {
  26. NotReady,
  27. Ready,
  28. Flashing,
  29. Started,
  30. InProcess,
  31. Fault,
  32. Success,
  33. FinishedOk,
  34. FinishedFail
  35. }
  36. enum TouchInputState
  37. {
  38. Idle,
  39. GracePeriod
  40. }
  41. static class Constants
  42. {
  43. public const string HighscorePopupTitle = "You made a high score!";
  44. public const string HighscorePopupText = "Enter your name (max 15 characters)";
  45. public const string HighscorePopupDefault = "Player";
  46. }
  47. static class Settings
  48. {
  49. // Amount of buttons
  50. public static int ButtonAmount = 4;
  51. // Sliding doors animation constants
  52. public static int DoorsAnimationStep = 5;
  53. public static Vector2 LeftDoorClosedPosition = new Vector2(0, 233);
  54. public static Vector2 LeftDoorOpenedPosition = new Vector2(-54, 233);
  55. public static Vector2 RightDoorClosedPosition = new Vector2(230, 233);
  56. public static Vector2 RightDoorOpenedPosition = new Vector2(284, 233);
  57. // Color button locations
  58. public static Vector2 RedButtonPosition = new Vector2(14,29);
  59. public static Vector2 GreenButtonPosition = new Vector2(161, 29);
  60. public static Vector2 BlueButtonPosition = new Vector2(14, 378);
  61. public static Vector2 YellowButtonPosition = new Vector2(161, 378);
  62. // Color button positions in the texture strip, with their sizes
  63. public static Vector2 ButtonSize = new Vector2(111, 123);
  64. public static Rectangle RedButtonDim = new Rectangle((int)ButtonSize.X * 0, 0,
  65. (int)ButtonSize.X, (int)ButtonSize.Y);
  66. public static Rectangle RedButtonLit = new Rectangle((int)ButtonSize.X * 1, 0,
  67. (int)ButtonSize.X, (int)ButtonSize.Y);
  68. public static Rectangle YellowButtonDim = new Rectangle((int)ButtonSize.X * 2, 0,
  69. (int)ButtonSize.X, (int)ButtonSize.Y);
  70. public static Rectangle YellowButtonLit = new Rectangle((int)ButtonSize.X * 3, 0,
  71. (int)ButtonSize.X, (int)ButtonSize.Y);
  72. public static Rectangle GreenButtonDim = new Rectangle((int)ButtonSize.X * 4, 0,
  73. (int)ButtonSize.X, (int)ButtonSize.Y);
  74. public static Rectangle GreenButtonLit = new Rectangle((int)ButtonSize.X * 5, 0,
  75. (int)ButtonSize.X, (int)ButtonSize.Y);
  76. public static Rectangle BlueButtonDim = new Rectangle((int)ButtonSize.X * 6, 0,
  77. (int)ButtonSize.X, (int)ButtonSize.Y);
  78. public static Rectangle BlueButtonLit = new Rectangle((int)ButtonSize.X * 7, 0,
  79. (int)ButtonSize.X, (int)ButtonSize.Y);
  80. }
  81. }