显示ara
This commit is contained in:
@@ -22,7 +22,10 @@ using static UnityEngine.Rendering.DebugUI.Table;
|
||||
public partial class MapManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Transform mapRegion;
|
||||
private Transform mapRegionParent;
|
||||
|
||||
public Transform mapGridParent;
|
||||
public Transform mapAreaParent;
|
||||
public Dictionary<string, (int maxRow, int maxCol)> allMaps = new Dictionary<string, (int maxRow, int maxCol)>();
|
||||
|
||||
/// <summary>
|
||||
@@ -137,7 +140,7 @@ public partial class MapManager : MonoBehaviour
|
||||
string filename = $"v{mapId}_r{row + 1}_c{col + 1}"; // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>v1000_r1_c1.jpg
|
||||
string spPath = PathUtil.GetMapTexure(1000, filename, "jpg");
|
||||
GameObject obj = new GameObject(filename);
|
||||
obj.transform.SetParent(mapRegion);
|
||||
obj.transform.SetParent(mapRegionParent);
|
||||
SpriteRenderer sr = obj.AddComponent<SpriteRenderer>();
|
||||
float x = col * jpgscenew;
|
||||
float y = (mapRownum - row - 1) * jpgscenew;
|
||||
@@ -156,7 +159,7 @@ public partial class MapManager : MonoBehaviour
|
||||
public void ClearMapRegions()
|
||||
{
|
||||
ClearMapGrid();
|
||||
foreach (Transform child in mapRegion)
|
||||
foreach (Transform child in mapRegionParent)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
@@ -165,7 +168,7 @@ public partial class MapManager : MonoBehaviour
|
||||
public void CreateObs()
|
||||
{
|
||||
if(_curMapRegions == null) return;
|
||||
float jpgscenew = PicMapPixel / 100;
|
||||
float jpgscenew = PicMapPixel / 100.0f;
|
||||
MapManager.Instance.GenerateMap(jpgscenew * _curMapRegions.regionColNum, jpgscenew * _curMapRegions.regionRowNum, _curMapRegions.cellWidthPixel / 100.0f, _curMapRegions.cellHeightPixel / 100.0f);
|
||||
}
|
||||
private async void multithreadLoadTextrue(string fullPath,SpriteRenderer sr)
|
||||
|
||||
Reference in New Issue
Block a user