From 5c99baf31bda6a0819aee5662a94a3aaa0aa6814 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Thu, 03 Apr 2025 18:48:49 +0000
Subject: [PATCH] #42 fixed chunk generation y position

---
 Assets/Scenes/GameplayScene.unity |    7 ++++++-
 Assets/Scripts/GenerateTileMap.cs |    4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Assets/Scenes/GameplayScene.unity b/Assets/Scenes/GameplayScene.unity
index c54abad..ca54f89 100644
--- a/Assets/Scenes/GameplayScene.unity
+++ b/Assets/Scenes/GameplayScene.unity
@@ -5579,7 +5579,8 @@
       propertyPath: m_IsActive
       value: 1
       objectReference: {fileID: 0}
-    m_RemovedComponents: []
+    m_RemovedComponents:
+    - {fileID: 851313892602111808, guid: 7296d9a2424531f4ba42c0c75e9c48a0, type: 3}
     m_RemovedGameObjects: []
     m_AddedGameObjects: []
     m_AddedComponents:
@@ -6093,6 +6094,10 @@
       propertyPath: m_Name
       value: Player
       objectReference: {fileID: 0}
+    - target: {fileID: 3345854317100013954, guid: c220ec455fce341408d66d880b464cad, type: 3}
+      propertyPath: m_TagString
+      value: Player
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
     m_RemovedGameObjects: []
     m_AddedGameObjects: []
diff --git a/Assets/Scripts/GenerateTileMap.cs b/Assets/Scripts/GenerateTileMap.cs
index 7bf0667..168a4eb 100644
--- a/Assets/Scripts/GenerateTileMap.cs
+++ b/Assets/Scripts/GenerateTileMap.cs
@@ -124,7 +124,7 @@
     private void UnloadChunk(Vector2Int chunk)
     {
         int startX = chunk.x * CHUNK_SIZE;
-        int startY = chunk.y * CHUNK_SIZE;
+        int startY = (chunk.y * CHUNK_SIZE)-1;
 
         for (int x = startX; x < startX + CHUNK_SIZE; x++)
         {
@@ -232,7 +232,7 @@
     private IEnumerator GenerateChunk(Vector2Int chunk, List<Vector3Int> destroyedTiles)
     {
         int startX = chunk.x * CHUNK_SIZE;
-        int startY = (chunk.y * CHUNK_SIZE);
+        int startY = (chunk.y * CHUNK_SIZE)-1;
 
         // Generate ground in chunk
         for (int x = startX; x < startX + CHUNK_SIZE; x++)

--
Gitblit v1.9.3