瀏覽代碼

可视化初始化修改

wgl 7 月之前
父節點
當前提交
c5f5341ee7

+ 1 - 1
ActionTowerDefense/Assets/GameLevelEditor/GAAWCITY/TimelineUI/Prefabs/Components/SwimlaneContentItem.prefab

@@ -68,7 +68,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
-    m_FontSize: 25
+    m_FontSize: 30
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2

+ 21 - 0
ActionTowerDefense/Assets/GameLevelEditor/GameMap/Sample/Scripts/Main.cs

@@ -39,6 +39,7 @@ public class Main : MonoBehaviour
 
 	private void Start()
 	{
+		refreshHasOut(0);
 		LoadMap(0);
 	}
 
@@ -72,6 +73,26 @@ public class Main : MonoBehaviour
 		}
 	}
 
+	public void refreshHasOut(int mapIdx)
+    {
+		GameMap map = mapsAsset.maps[mapIdx];
+		for (int i = 0; i < map.LayerCount; i++)
+		{
+			int[] grid = map.GetlayerData(i);
+			int idx = 0;
+			for (int y = 0; y < map.height; y++)
+			{
+				for (int x = 0; x < map.width; x++)
+				{
+					GameMapTile t = mapsAsset.tileAsset.GetTile(grid[idx++]);
+					if (t == null) continue;
+					t.hasOut = false;
+					t.index = -1;
+				}
+			}
+		}
+	}
+
 	// an example of how map data could be loaded
 	private void LoadMap(int mapIdx)
 	{

+ 10 - 7
ActionTowerDefense/Assets/GameLevelEditor/tiles.asset

@@ -22,7 +22,7 @@ MonoBehaviour:
     radius: {x: 0, y: 0}
     name: "\u9632\u5FA1\u5854"
     spawnTime: []
-    index: 1
+    index: -1
     hasOut: 0
   - id: 166
     sprite: {fileID: 21300000, guid: 65b0651ef19a49c4e9c6c4ff297c3d52, type: 3}
@@ -33,7 +33,7 @@ MonoBehaviour:
     radius: {x: 0, y: 0}
     name: "\u654C\u65B9\u9632\u5FA1\u5854"
     spawnTime: []
-    index: 2
+    index: -1
     hasOut: 0
   - id: 163
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
@@ -47,7 +47,7 @@ MonoBehaviour:
     - startTime: 1
       endTime: 5
       num: 2
-    index: 4
+    index: -1
     hasOut: 0
   - id: 164
     sprite: {fileID: 21300000, guid: 43f59a03605a34d4abed7ed387066287, type: 3}
@@ -58,7 +58,7 @@ MonoBehaviour:
     radius: {x: 1, y: 2}
     name: "\u6B66\u672F\u5BB6"
     spawnTime: []
-    index: 5
+    index: -1
     hasOut: 0
   - id: 165
     sprite: {fileID: 21300000, guid: b371758afaed0994e9076c34d8dbac5f, type: 3}
@@ -69,7 +69,7 @@ MonoBehaviour:
     radius: {x: 2, y: 1}
     name: "\u80D6\u5B50"
     spawnTime: []
-    index: 0
+    index: -1
     hasOut: 0
   - id: 168
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
@@ -79,8 +79,11 @@ MonoBehaviour:
     color: {r: 0.1495924, g: 1, b: 0, a: 1}
     radius: {x: 2, y: 2}
     name: "\u5F13\u7BAD\u624B2"
-    spawnTime: []
-    index: 3
+    spawnTime:
+    - startTime: 2
+      endTime: 3
+      num: 5
+    index: -1
     hasOut: 0
   autoTiles:
   - id: 1