예제 #1
0
    private void Start()
    {
        Assert.IsNotNull(worldController);
        Assert.IsNotNull(newProjectButton);
        Assert.IsNotNull(theme);
        Assert.IsNotNull(menu);
        Assert.IsNotNull(pauseButton);
        Assert.IsNotNull(speedButton);
        Assert.IsNotNull(currentDateText);
        Assert.IsNotNull(playerCompanyMoneyText);
        Assert.IsNotNull(playerCompanyMoneyText);
        Assert.IsNotNull(newsBarPanelModel);
        Assert.IsNotNull(newsBarPanelsParent);

        for (int i = 0; i < maximumNewsCount; i++)
        {
            NewsBarPanel newsBarPanel = Instantiate(newsBarPanelModel);
            newsBarPanel.transform.SetParent(newsBarPanelsParent, false);
            newsBarPanel.name = $"NewsBarPanel_{i}";
            newsBarPanel.gameObject.SetActive(false);
            newsBarPanels.Add(newsBarPanel);
        }
        newsBarPanelModel.gameObject.SetActive(false);

        menu.ApplyTheme(theme);
    }