From b33de2e732fb46dd6afc286bedc886412d7aee0b Mon Sep 17 00:00:00 2001
From: Raffael Di Pietro <maxou4170@gmail.com>
Date: Tue, 30 Mar 2021 17:54:48 +0200
Subject: [PATCH] GenerateMap en singleton

---
 Assets/Scripts/Game/GenerateMap.cs | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/Game/GenerateMap.cs b/Assets/Scripts/Game/GenerateMap.cs
index a970868..bcc52da 100644
--- a/Assets/Scripts/Game/GenerateMap.cs
+++ b/Assets/Scripts/Game/GenerateMap.cs
@@ -27,7 +27,17 @@ public class GenerateMap : MonoBehaviour
 
     //Les coordonées y dans l'ordre
     private int[] ys=new int[]{26,13,0}; //ligne
-    // Start is called before the first frame update
+
+
+    public static GenerateMap instance;
+
+    private void Awake()
+    {
+        if (instance != null)
+            return;
+        instance = this;
+    }
+
     void Start()
     {
         generateVillage();
-- 
GitLab