コード例 #1
0
    public void Initialize()
    {
        if (frontGround == null)
        {
            frontGround = GameObject.Find("FrontGround").GetComponent <Image>();
        }
        if (IntroUI == null)
        {
            IntroUI = GameObject.FindObjectOfType <UIIntro>();
        }
        if (LoadingUI == null)
        {
            LoadingUI = GameObject.FindObjectOfType <UILoading>();
        }
        if (TimerUI == null)
        {
            TimerUI = GameObject.FindObjectOfType <UITimer>();
        }
        if (ScoreUI == null)
        {
            ScoreUI = GameObject.FindObjectOfType <UIScore>();
        }
        if (ResultUI == null)
        {
            ResultUI = GameObject.FindObjectOfType <UIResult>();
        }

        IntroUI.Initialize(this);
        LoadingUI.Initialize(this);
        TimerUI.Initialize(this);
        ScoreUI.Initialize(this);
        ResultUI.Initialize(this);
    }