// Use this for initialization void Awake() { if (Instance == null) { Instance = this; } MapManager = GetComponent <MapManager>(); string ErrorModule = string.Empty; if (GameStateManager.Instance.AreAllModulesWork(out ErrorModule)) { InitGame(); } else { Debug.LogError("Problem with Loading instance: " + ErrorModule); GameStateManager.Instance.BuildContainer(); InitGame(); } }
public void Destroy() { Destroy(this.gameObject); Instance = null; }