Esempio n. 1
0
        void Finish()
        {
            void Progress()
            {
                Core.UI.Rewards.OnFinish -= Progress;

                Popup.Hide();

                PlayFab.Activated = true;

                Scenes.Load.One(Scenes.MainMenu);
            }

            Popup.Hide();
            Core.Prefs.NeedOnlineLogin.Value = false;

            if (DailyReward == null || DailyReward.Items == null || DailyReward.Items.Length == 0)
            {
                Progress();
            }
            else
            {
                var stacks = ItemStack.From(DailyReward.Items);

                var title = Localization.Phrases.Get("daily reward") + Environment.NewLine;
                title += Localization.Phrases.Get("day") + " " + (DailyReward.Progress + 1).ToString() + "\\" + PlayFab.DailyReward.Max;

                Core.UI.Rewards.OnFinish += Progress;
                Core.UI.Rewards.Show(title, stacks);
            }
        }
        void OnInventoryResponse(PlayFabPlayerInventoryCore inventory, PlayFab.PlayFabError error)
        {
            PlayFab.Player.Inventory.OnResponse -= OnInventoryResponse;

            if (error == null)
            {
                Popup.Hide();

                UpdateState();
            }
            else
            {
                Popup.Show(error.ErrorMessage, Popup.Hide, "Close");
            }
        }
Esempio n. 3
0
        void InventoryResponseCallback(PlayFabPlayerInventoryCore result, PlayFab.PlayFabError error)
        {
            PlayFab.Player.Inventory.OnResponse -= InventoryResponseCallback;

            if (error == null)
            {
                void Action()
                {
                    Popup.Hide();

                    Hide();
                }

                Popup.Show(Core.Localization.Phrases.Get("Purchase Successful"), Action, Core.Localization.Phrases.Get("Okay"));
            }
            else
            {
                RaiseError(error);
            }
        }
Esempio n. 4
0
        public virtual void Reload()
        {
            SceneManager.LoadScene(Scenes.Login.name);

            Popup.Hide();
        }