Пример #1
0
    private void OnLogin(User user)
    {
        R_UserGame userGame = null;

        try
        {
            Debug.Log("OnLogin() - MainMenu.userInfo check");
            userGame = R_UserGameService.Instance.GetUserGameByUserIdAndGameCode(user.user_id, Constant.GAME_CODE);
        }
        catch (DatabaseConnectionException e)
        {
            Debug.Log("###### Exception #########");
            Debug.Log(e.ToString());
            Debug.Log(Properties.GetDatabaseConnectionErrorMessage());
            return;
        }

        MainMenu.userInfo.nick_name = userGame.nick_name;
        androidSet.ShowToast(Properties.GetLoginSucceedMessage() + " (" + MainMenu.userInfo.nick_name + ")", false);
        Debug.Log("환영합니다 " + MainMenu.userInfo.nick_name + "님. " + (user.visit_count + 1) + "번째 방문입니다.");
        int ret = UserService.Instance.UpdateUserByUserId(user.user_id, "visit_count", user.visit_count + 1);

        Debug.Log("ret is " + ret);

        loginFinish = true;
    }
Пример #2
0
 public void Rankboard()
 {
     try
     {
         Checker.checkSceneAndLoginAndInternetStatus((int)Constant.SceneNumber.MAIN_MENU);
     }
     catch (NotReachableSceneException e)
     {
         androidSet.ShowToast(e.Message, false);
         return;
     }
     catch (NotReachableInternetException e)
     {
         androidSet.ShowToast(e.Message, false);
         return;
     }
     catch (NotLoginException e)
     {
         androidSet.ShowToast(e.Message, false);
         return;
     }
     SceneManager.LoadScene((int)Constant.SceneNumber.RANK_BOARD);
 }
Пример #3
0
    public void ShowLeaderboardUI()
    {
        Debug.Log("### ShowLeaderboardUI");

        // Sign In 이 되어있지 않은 상태라면
        // Sign In 후 리더보드 UI 표시 요청할 것
        if (!Social.localUser.authenticated)
        {
            Debug.Log("로그인 되어있지 않음");
            androidSet.ShowToast("로그인 후 확인할 수 있습니다.", false);
            return;
        }

#if UNITY_ANDROID
        PlayGamesPlatform.Instance.ShowLeaderboardUI();
#elif UNITY_IOS
        GameCenterPlatform.ShowLeaderboardUI("Leaderboard_ID", UnityEngine.SocialPlatforms.TimeScope.AllTime);
#endif
    }
Пример #4
0
    // Start is called before the first frame update
    void Start()
    {
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            androidSet.ShowToast("offline mode", false);
            return;
        }

        if (SceneManager.GetActiveScene().buildIndex == (int)Constant.SceneNumber.PROLOGUE)
        {
            Prologue prologue = PrologueService.Instance.GetPrologueByContentTypeAndLanguage("prologue", (int)Application.systemLanguage);
            if (prologue == null)
            {
                Debug.Log("Failed to get prologue");
                return;
            }
            textUI.text = prologue.content;
            replay();
            StartCoroutine(DoScrollText());
        }
    }