diff --git a/Assets/Scripts/Cam.cs b/Assets/Scripts/Cam.cs index 939e9d6..10dc437 100644 --- a/Assets/Scripts/Cam.cs +++ b/Assets/Scripts/Cam.cs @@ -114,6 +114,7 @@ void Update() t.Translate(Input.GetAxis("Horizontal") * moveFactor, 0f, Input.GetAxis("Vertical") * moveFactor); // Rotation + //Debug.Log($"Center={World.Center}"); t.RotateAround(World.Center, Vector3.up, Input.GetAxis("Rotate") * rotateSpeed * Time.deltaTime); // Clamp position diff --git a/Assets/Scripts/World.cs b/Assets/Scripts/World.cs index b01f701..f939b7c 100644 --- a/Assets/Scripts/World.cs +++ b/Assets/Scripts/World.cs @@ -149,6 +149,7 @@ void Start() if (loadData == null) { + UpdateWorldSize(); InitLoader(); StartCoroutine(Generate()); } @@ -573,7 +574,7 @@ public void BuildRoad(Cell pos) AudioManager.Player.Play("buildRoad"); Road road = new Road(pos, roadPrefab); Constructions[pos.X, pos.Y] = road; - + UpdateRoad(road); var neighbors = Neighbors(pos); foreach (Road r in neighbors)