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/Scripts/GenerateTileMap.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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