From 295f16e499165db1daaf7d71cf1d6200ab44c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Sun, 2 Jun 2019 18:01:59 +0300 Subject: [PATCH] Fix startzone tile generation --- Assets/Scripts/src/Managers/LevelManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/src/Managers/LevelManager.cs b/Assets/Scripts/src/Managers/LevelManager.cs index ffd4130..e0943e0 100644 --- a/Assets/Scripts/src/Managers/LevelManager.cs +++ b/Assets/Scripts/src/Managers/LevelManager.cs @@ -56,19 +56,19 @@ namespace src.Managers { /* We want the following positions to be a safe zone. */ /* Don't place anything on starting position */ - if (Math.Abs(x) < 0.001 && Math.Abs(y) < 0.001) + if (Mathf.FloorToInt(x) == 0 && Mathf.FloorToInt(y) == 0) { continue; } /* Don't place anything on X=1 and Y=0 */ - if (Math.Abs(x - 1) < 0.001 && Math.Abs(y) < 0.001) + if (Mathf.FloorToInt(x) == 1 && Mathf.FloorToInt(y) == 0) { continue; } /* Don't place anything on X=0 and Y=1 */ - if (Math.Abs(x) < 0.001 && Math.Abs(y - 1) < 0.001) + if (Mathf.FloorToInt(x) == 0 && Mathf.FloorToInt(y) == 1) { continue; }