예제 #1
0
    private void OpenGame()
    {
        if (Database.Instance.islogin)
        {
            UILayerController.Instance.ShowLoading();

            StartCoroutine(ISendRequestOther("1", "https://api.loc.red//Account/GetTokenAuthen", null, 0, (responseData) =>
            {
                StartCoroutine(ISendRequestOther("1", "https://api.loc.red//Account/GetFishAccount", null, 0, (res) =>
                {
                    UILayerController.Instance.HideLoading();
                    fishAccount = JsonConvert.DeserializeObject <FAccountResponse>(res);

                    if (fishAccount != null)
                    {
                        OpenApp(responseData);
                    }
                    else
                    {
                        LPopup.OpenPopupTop("Thông báo", "Đã xảy ra lỗi vui lòng thử lại!");
                    }
                }));
            }));
        }
        else
        {
            NotifyController.Instance.Open("Bạn cần phải đăng nhập để chơi game!", NotifyController.TypeNotify.Error);
        }
    }
예제 #2
0
    public override void ShowLayer()
    {
        base.ShowLayer();
        FAccountResponse fish = FishSignIR.Instance.fishAccount;

        UpdateCurrentMoney(fish.data.currentBalance);
        IDCa.text = fish.data.userid.ToString();
    }