miepzerino
2025-04-03 5c99baf31bda6a0819aee5662a94a3aaa0aa6814
#42 fixed chunk generation y position
2 files modified
11 ■■■■ changed files
Assets/Scenes/GameplayScene.unity 7 ●●●● patch | view | raw | blame | history
Assets/Scripts/GenerateTileMap.cs 4 ●●●● patch | view | raw | blame | history
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: []
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++)