// Use this for initialization void Awake() { RegionConfigDataBase _config = null; if (GameManager.Instance.ChoosenRegionConfig == null && Override != null) { _config = Override; GameManager.Instance.ChoosenRegionConfig = Override; } else if (GameManager.Instance.ChoosenRegionConfig != null) { _config = GameManager.Instance.ChoosenRegionConfig; } GameObject prefab; if (_config != null && _config.IsTutorial) { prefab = Resources.Load("Regions/worldextender_tutorial") as GameObject; } else { prefab = Resources.Load("Regions/worldextender_normal") as GameObject; } WorldExtender ext = prefab.Instantiate(transform, true).GetComponent <WorldExtender>(); ext.SetupGame(_config); }
public virtual void SetupGame(RegionConfigDataBase Region) { RegionBalance = Region; Instance = this; if (TurnSystem.Instance != null) { TurnSystem.Instance.OnGlobalTurn += OnGlobalTurn; } spawned = new List <RegionConfig>(); SetSpawnConfigs(Region); SpawnNext(); SpawnNext(); PlayAmbient(); }