TileContent.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #region License
  2. // Copyright 2021 Kastellanos Nikolaos
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. #endregion
  16. using Microsoft.Xna.Framework;
  17. using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
  18. namespace nkast.Aether.Content.Pipeline
  19. {
  20. public class TileContent
  21. {
  22. internal TilesetContent Tileset;
  23. internal int Id;
  24. public TextureContent SrcTexture;
  25. public Rectangle SrcBounds;
  26. public Rectangle DstBounds;
  27. public TileContent()
  28. {
  29. this.Tileset = null;
  30. this.Id = -1;
  31. this.SrcTexture = null;
  32. this.SrcBounds = Rectangle.Empty;
  33. this.DstBounds = Rectangle.Empty;
  34. }
  35. public TileContent(TileContent other)
  36. {
  37. this.Tileset = other.Tileset;
  38. this.Id = other.Id;
  39. this.SrcTexture = other.SrcTexture;
  40. this.SrcBounds = other.SrcBounds;
  41. this.DstBounds = other.DstBounds;
  42. }
  43. public override string ToString()
  44. {
  45. return string.Format("{{SrcBounds:{0}, DstBounds{1}}}", SrcBounds, DstBounds);
  46. }
  47. }
  48. }