소스 검색

修复相同图标只有一个图标位置会出怪(靠下靠左的)

wgl 7 달 전
부모
커밋
0e2b3d8b50
2개의 변경된 파일13개의 추가작업 그리고 32개의 파일을 삭제
  1. 0 0
      ActionTowerDefense/Assets/GameLevelEditor/maps.asset
  2. 13 32
      ActionTowerDefense/Assets/Scripts/EnemyCreater.cs

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
ActionTowerDefense/Assets/GameLevelEditor/maps.asset


+ 13 - 32
ActionTowerDefense/Assets/Scripts/EnemyCreater.cs

@@ -64,54 +64,35 @@ public class EnemyCreater : MonoBehaviour
     }
 
 
-    public void refreshHasOut(GameMap map)
-    {
-        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;
-                }
-            }
-        }
-    }
 
     public void LoadMapAsset(int mapIdx)
     {
         GameMap map = mapsAsset.maps[mapIdx];
-        refreshHasOut(map);
+
         int startTime = 0;
+        
         for (int i = 1; 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;
-                    if (!t.hasOut)
+                    for (int j = 0; j < t.spawnTime.Length; j++)
                     {
-                        t.hasOut = true;
-                        for (int j = 0; j < t.spawnTime.Length; j++)
-                        {
-                            CreaterControl createrControl = new();
-                            createrControl.isCreated = false;
-                            createrControl.tile = t;
-                            createrControl.spawnTimeId = j;
-                            createrControl.pos = new Vector3(x, y, 0);
-                            createrControl.waveStartTime = startTime;
-                            createrControl.mapLayer = map.layers[i - 1];
-                            createCharacter.Add(createrControl);
-                        }
+                        CreaterControl createrControl = new();
+                        createrControl.isCreated = false;
+                        createrControl.tile = t;
+                        createrControl.spawnTimeId = j;
+                        createrControl.pos = new Vector3(x, y, 0);
+                        createrControl.waveStartTime = startTime;
+                        createrControl.mapLayer = map.layers[i - 1];
+                        createCharacter.Add(createrControl);
                     }
                 }
             }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.