PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/WorldView/Structures/Sign.cs

#
C# | 101 lines | 91 code | 10 blank | 0 comment | 0 complexity | b47429a432ab32adf8705b9f61719d78 MD5 | raw file
  1. using System;
  2. using System.Drawing;
  3. namespace MoreTerra.Structures
  4. {
  5. public enum SignType
  6. {
  7. Sign = 0,
  8. Tombstone
  9. }
  10. public class Sign
  11. {
  12. private Int32 signId;
  13. private Boolean activeSign;
  14. private String signText;
  15. private Point signPosition;
  16. private SignType signType;
  17. public Sign()
  18. {
  19. signId = -1;
  20. activeSign = false;
  21. signText = String.Empty;
  22. signPosition = new Point(0, 0);
  23. signType = SignType.Sign;
  24. }
  25. public Sign(Int32 id, Boolean active, String text, Point pos)
  26. {
  27. signId = id;
  28. activeSign = active;
  29. signText = text;
  30. signPosition = pos;
  31. signType = SignType.Sign;
  32. }
  33. #region GetSet Functions
  34. public Int32 Id
  35. {
  36. get
  37. {
  38. return this.signId;
  39. }
  40. set
  41. {
  42. this.signId = value;
  43. }
  44. }
  45. public Boolean Active
  46. {
  47. get
  48. {
  49. return this.activeSign;
  50. }
  51. set
  52. {
  53. this.activeSign = value;
  54. }
  55. }
  56. public String Text
  57. {
  58. get
  59. {
  60. return this.signText;
  61. }
  62. set
  63. {
  64. this.signText = value;
  65. }
  66. }
  67. public Point Position
  68. {
  69. get
  70. {
  71. return this.signPosition;
  72. }
  73. set
  74. {
  75. this.signPosition = value;
  76. }
  77. }
  78. public SignType Type
  79. {
  80. get
  81. {
  82. return this.signType;
  83. }
  84. set
  85. {
  86. this.signType = value;
  87. }
  88. }
  89. #endregion
  90. }
  91. }