MapSquare.cs 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.Xna.Framework;
  6. using Microsoft.Xna.Framework.Graphics;
  7. namespace Tile_Engine
  8. {
  9. [Serializable]
  10. public class MapSquare
  11. {
  12. #region Declarations
  13. public int[] LayerTiles = new int[3];
  14. public string CodeValue = "";
  15. public bool Passable = true;
  16. #endregion
  17. #region Constructor
  18. public MapSquare(
  19. int background,
  20. int interactive,
  21. int foreground,
  22. string code,
  23. bool passable)
  24. {
  25. LayerTiles[0] = background;
  26. LayerTiles[1] = interactive;
  27. LayerTiles[2] = foreground;
  28. CodeValue = code;
  29. Passable = passable;
  30. }
  31. #endregion
  32. #region Public Methods
  33. public void TogglePassable()
  34. {
  35. Passable = !Passable;
  36. }
  37. #endregion
  38. }
  39. }