From 40ac185dc7a017d95771fe580c77eab20e663908 Mon Sep 17 00:00:00 2001 From: miepzerino <o.skotnik@gmail.com> Date: Tue, 08 Apr 2025 17:36:08 +0000 Subject: [PATCH] #46 added interactables --- Assets/Scripts/GenerateTileMap.cs | 64 ++++++++++++++++---------------- 1 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Assets/Scripts/GenerateTileMap.cs b/Assets/Scripts/GenerateTileMap.cs index d2ea3a2..0b3a588 100644 --- a/Assets/Scripts/GenerateTileMap.cs +++ b/Assets/Scripts/GenerateTileMap.cs @@ -588,41 +588,41 @@ chunkCache.Clear(); } #if UNITY_EDITOR - private void OnDrawGizmos() - { - if (!Application.isPlaying) return; + //private void OnDrawGizmos() + //{ + // if (!Application.isPlaying) return; - // Draw current chunk boundaries - if (playerTransform != null) - { - Vector2Int currentChunk = GetChunkPosition(playerTransform.position); - Gizmos.color = Color.yellow; + // // Draw current chunk boundaries + // if (playerTransform != null) + // { + // Vector2Int currentChunk = GetChunkPosition(playerTransform.position); + // Gizmos.color = Color.yellow; - for (int x = -LOAD_DISTANCE; x <= LOAD_DISTANCE; x++) - { - for (int y = -LOAD_DISTANCE; y <= LOAD_DISTANCE; y++) - { - Vector2Int chunk = new Vector2Int(currentChunk.x + x, currentChunk.y + y); - Vector3 worldPos = new Vector3( - chunk.x * CHUNK_SIZE + transform.position.x, - chunk.y * CHUNK_SIZE + transform.position.y, - 0 - ); + // for (int x = -LOAD_DISTANCE; x <= LOAD_DISTANCE; x++) + // { + // for (int y = -LOAD_DISTANCE; y <= LOAD_DISTANCE; y++) + // { + // Vector2Int chunk = new Vector2Int(currentChunk.x + x, currentChunk.y + y); + // Vector3 worldPos = new Vector3( + // chunk.x * CHUNK_SIZE + transform.position.x, + // chunk.y * CHUNK_SIZE + transform.position.y, + // 0 + // ); - // Draw chunk boundary - Gizmos.DrawWireCube( - worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0), - new Vector3(CHUNK_SIZE, CHUNK_SIZE, 0) - ); + // // Draw chunk boundary + // Gizmos.DrawWireCube( + // worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0), + // new Vector3(CHUNK_SIZE, CHUNK_SIZE, 0) + // ); - // Draw chunk coordinates - UnityEditor.Handles.Label( - worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0), - $"({chunk.x}, {chunk.y})" - ); - } - } - } - } + // // Draw chunk coordinates + // UnityEditor.Handles.Label( + // worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0), + // $"({chunk.x}, {chunk.y})" + // ); + // } + // } + // } + //} #endif } -- Gitblit v1.9.3