// Start is called before the first frame update

    void Awake()
    {
        _DataManager = GetComponent <DataManager>();
        _DataManager.Init();

        countrySelectedList = new List <Country_SO>();

        _MarkControllers = m_Maps.GetComponentsInChildren <MarkController>();

        foreach (var item in _MarkControllers)
        {
            item.Init(this);
            item.OnCountryShow += ShowCountyInfo;
        }

        _CountryInfo = m_Canvas.GetComponentInChildren <CountryInfoUIController>(true);
        _CountryInfo.Init(this);

        _MainUIController = m_Canvas.GetComponentInChildren <MainUIController>(true);
        _MainUIController.Init(this);

        _SelectCountryUIController = m_Canvas.GetComponentInChildren <SelectCountryUIController>(true);
        _SelectCountryUIController.Init(this);

        UpdateUI();
    }
Beispiel #2
0
    private void Init()
    {
        string configPath = Application.dataPath + "/Resources/Configs";

        ConfigHandler.LoadConfigs(configPath);
        instance = this;
        mainUIController.Init();
        player             = LoadOrCreatePlayer();
        combatStateMachine = new CombatStateMachine();
        combatStateMachine.Init();
        timelineScriptController = MainUIController.instance.GetTimelineController().GetComponent <TimelineScriptController>();
    }