Beispiel #1
0
        private void OnBusinessWasSoldToInvestors(int planetId, double securities, int interval)
        {
            LastSellSecuritiesOnCurrentPlanet = securities;
            UDBG.Log($"updated {nameof(LastSellSecuritiesOnCurrentPlanet)} = {LastSellSecuritiesOnCurrentPlanet}".Attrib(
                         bold: true,
                         color: "white"));

            History.Add(new HistoryEntry(planetId, securities, interval));

            GameMode.AddResetCount(1);
            FacebookEventUtils.LogSellBusinessToInvestorsEvent(GameServices.Instance.GameModeService.ResetCount);
            LocalData.TutorialInvestorsComplete = true;

            if (!IsAlreadySolded)
            {
                IsAlreadySolded = true;
                Services.ViewService.ShowDelayed(UI.ViewType.InvestorConfirmMessageBox,
                                                 BosUISettings.Instance.ViewShowDelay, new ViewData {
                    UserData  = securities,
                    ViewDepth = ViewService.NextViewDepth
                });
            }
            else
            {
                Sounds.PlayOneShot(SoundName.slotWin);
                ReloadAfterSold();
            }
        }