Commit 0afe8bd5 authored by lijin's avatar lijin

組按鈕BUG

parent 24ad9062
...@@ -52,8 +52,11 @@ public class GameEditor ...@@ -52,8 +52,11 @@ public class GameEditor
Color[] c = rd.png.GetPixels(); Color[] c = rd.png.GetPixels();
rd.png = new Texture2D(rd.png.width, rd.png.height, rd.png.format, false); rd.png = new Texture2D(rd.png.width, rd.png.height, rd.png.format, false);
rd.png.SetPixels(c); rd.png.SetPixels(c);
List<short> l = new List<short>();
short[] l = new short[2048 * 2048]; for (int i = 0; i < 2048 * 2048; i++)
{
l.Add(-1);
}
for (int i = 0; i < rd.json.roomDatas.Count; i++) for (int i = 0; i < rd.json.roomDatas.Count; i++)
{ {
FunDo(l, rd.png, rd.json.roomDatas[i]); FunDo(l, rd.png, rd.json.roomDatas[i]);
...@@ -79,7 +82,7 @@ public class GameEditor ...@@ -79,7 +82,7 @@ public class GameEditor
Debug.Log("成功:" + savePath); Debug.Log("成功:" + savePath);
} }
public static void FunDo(short[] l, Texture2D png, RoomDatas rd) public static void FunDo(List<short> l, Texture2D png, RoomDatas rd)
{ {
V2 v = new V2(rd.px, rd.py); V2 v = new V2(rd.px, rd.py);
Stack<V2> stackVector2 = new Stack<V2>(); Stack<V2> stackVector2 = new Stack<V2>();
......
...@@ -89,7 +89,6 @@ public class MainData : MonoBehaviour ...@@ -89,7 +89,6 @@ public class MainData : MonoBehaviour
if (rgd.id == curGroupId || b) if (rgd.id == curGroupId || b)
{ {
ExRoomDatas erd = new ExRoomDatas(); ExRoomDatas erd = new ExRoomDatas();
rgd.roomIds.Remove(id);
dynamic.AddData(rgd.id, id); dynamic.AddData(rgd.id, id);
Color[] c_png = png.GetPixels(); Color[] c_png = png.GetPixels();
for (int j = 0; j < json.allPos.Count; j++) for (int j = 0; j < json.allPos.Count; j++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment