recrownedgtk/RecrownedGTK/AssetsSystem/Information/TextureMapInfo.cs

32 lines
1.1 KiB
C#
Raw Normal View History

2020-02-23 19:48:16 +00:00
using RecrownedGTK.Types;
namespace RecrownedGTK.AssetsSystem.Information {
2020-02-23 19:48:16 +00:00
public struct TextureMapInfo {
public string pathToMap;
public MapRegionInfo[] regionInfos;
public TextureMapInfo(string pathToMap, params MapRegionInfo[] regionInfos) {
this.pathToMap = pathToMap;
this.regionInfos = regionInfos;
}
public struct MapRegionInfo {
public string name;
public NinePatchInfo ninePatchInfo;
public int x, y, width, height;
public MapRegionInfo(string name, int x, int y, int width, int height, NinePatchInfo ninePatchInfo = default(NinePatchInfo)) {
this.name = name;
this.ninePatchInfo = ninePatchInfo;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public void SetBounds(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
}
}
}