MapSquare.cs 830 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. public int[] LayerTiles = new int[3];
  13. public string CodeValue = "";
  14. public bool Passable = true;
  15. public MapSquare(
  16. int background,
  17. int interactive,
  18. int foreground,
  19. string code,
  20. bool passable)
  21. {
  22. LayerTiles[0] = background;
  23. LayerTiles[1] = interactive;
  24. LayerTiles[2] = foreground;
  25. CodeValue = code;
  26. Passable = passable;
  27. }
  28. public void TogglePassable()
  29. {
  30. Passable = !Passable;
  31. }
  32. }
  33. }