コード例 #1
0
    public void GoToStartScene()
    {
        if (SceneManager.GetActiveScene() == SceneManager.GetSceneByName("StartScene"))
        {
            return;
        }
        dayOnGoing     = false;
        dayDone        = false;
        timeCursor     = 0f;
        wineDineCursor = 0f;
        //하루는 정리해줌

        Debug.Log("스타트씬으로");
        StartCoroutine(LoadingScene("StartScene", () => {
            StartSceneUIManager ssUI = GameObject.Find("StartCanvas").GetComponent <StartSceneUIManager>();
            LanguageManager.GetInstance().AddListnerLanguageChange(ssUI.langChanged);

            ssUI.InitStartUI();
        }));
    }
コード例 #2
0
    IEnumerator Start()
    {
        Debug.Log("게임매니저 스타트");

        Screen.autorotateToLandscapeLeft      = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToPortrait           = false;
        Screen.autorotateToPortraitUpsideDown = false;


        //Screen.SetResolution(1920, 1080, false);

        Screen.SetResolution(1080, 1920, true);


        Screen.orientation = ScreenOrientation.Landscape;
        firstLogin         = false;
        object n = new object();

        lock (n)
        {
            LogInGooglePlay();
        }


        DontDestroyOnLoad(this.gameObject);
        screenImage.gameObject.SetActive(false);

        dayOnGoing     = false;
        dayDone        = false;
        timeCursor     = 0f;
        wineDineCursor = 0f;

        TextManager.GetInstance().Init();
        LanguageManager.GetInstance().Init();
        MobEviInfoManager.GetInstance().Init();
        WeaponInfoManager.GetInstance().Init();
        UIGeneralTextsManager.GetInstance().Init(); //이닛단에서 랭귀지 애드 리스너도 함.



        StartSceneUIManager ssUI = GameObject.Find("StartCanvas").GetComponent <StartSceneUIManager>();

        LanguageManager.GetInstance().AddListnerLanguageChange(ssUI.langChanged);
        ssUI.gameObject.SetActive(false);
        while (Social.localUser.authenticated == false && false == firstLogin)  //인증 되는 거 기다림., 세이브 매니저 이닛도 기다림.
        {
            Debug.Log("인증 기다리는중");
            yield return(new WaitForSeconds(2f));
        }

        Debug.Log("게임매니저 - 인증 끝 확인");
        yield return(new WaitForSeconds(2f));


        bool saved = SaveManager.GetInstance().IsThereSavedGame();

        if (saved)
        {
            Debug.Log("게임매니저 - 세이브 있음 확인.");
            LanguageManager.GetInstance().SetLanguage(SaveManager.GetInstance().GetSavedGameLang());
        }
        ssUI.gameObject.SetActive(true);

        ssUI.InitStartUI();
    }