From ff3f9c75fccb3fbb7b882ec29e754e6135b53e60 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Tue, 01 Apr 2025 20:58:42 +0000
Subject: [PATCH] #25 oreTiles now connect to forestTiles

---
 Assets/Scripts/GenerateTileMap.cs |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Assets/Scripts/GenerateTileMap.cs b/Assets/Scripts/GenerateTileMap.cs
index 231f61a..156ebab 100644
--- a/Assets/Scripts/GenerateTileMap.cs
+++ b/Assets/Scripts/GenerateTileMap.cs
@@ -24,7 +24,7 @@
     [Tooltip("The lower the number the more dense the ore will spawn (big clusters. Higher number means little clusters (more spread).")]
     [Range(10, 100000)]
     public int clusterWeight;
-    public RuleTile tile;
+    public CustomRuleTile tile;
     public int maxSpawnHeight;
     public int minSpawnHeight;
 }
@@ -32,14 +32,14 @@
 public class GenerateTileMap : MonoBehaviour
 {
     public int? seed;
-    public int maxWidth = 256;
-    public int maxHeight = 384;
-    public int maxGroundHeight = 256;
+    public static int maxWidth = 256;
+    public static int maxHeight = 384;
+    public static int maxGroundHeight = 256;
     private float scale;
     private float offsetX;
     private float offsetY;
     Tilemap tilemap;
-    public RuleTile forestRuleTile;
+    public CustomRuleTile forestRuleTile;
     public TileBase borderTile;
     public List<Ore> ores;
     //public List<TileBase> tiles;
@@ -56,6 +56,8 @@
         }
 
         SetSettingsFromSeed(seed.Value);
+
+        transform.position = new Vector3((maxWidth / 2) * -1, (maxGroundHeight + 1) * -1, transform.position.z);
     }
 
     public void SetSettingsFromSeed(int seed)

--
Gitblit v1.9.3