Ejemplo n.º 1
0
    /// <summary>
    /// Конец месяца
    /// </summary>
    private void EndMonth()
    {
        float summ = GameConst.MoneyMonth;//+ (GameConst.MoneyMonth * HouseTechnology.EconomyProgress);
        float moneyProcent = 1f;

        if (MoodCharacter.MoodPeoples < .5f)
        {
            moneyProcent = .8f;
        }
        else if (MoodCharacter.MoodPeoples > .75f)
        {
            moneyProcent = 1f;
        }
        else
        {
            moneyProcent = .9f;
        }

        float moneyPast = Money;
        float moneyAll = moneyPast + (summ * moneyProcent);

        var currentMonth = new DataMonthJeka3
        {
            Summ = summ,
            MoneyProcent = moneyProcent,
            MoneyPast = Money,
            MoneyAll = moneyAll,
            FondOst = FondMoney,
            FondKredit = 0,
            FondOut = FondOut,
            FondIn = FondIn + (GameConst.MoneyMonth * .25f),
            Summary = summ - GameConst.MoneyMonth
        };

        var sumMoney = summ - (GameConst.MoneyMonth * .25f);
        var sumFond = (GameConst.MoneyMonth * .25f);

        Money += sumMoney;
        FondMoney += sumFond;

        FondIn = 0;
        FondOut = 0;

        if (Money > 200000)
        {
            Achievements.SetMoney();
        }

        Achievements.AddMoodPeople(MoodCharacter.MoodPeoples > .9f);
        BaseGUI.instance.OnPaymentPopup(currentMonth);
    }
Ejemplo n.º 2
0
    internal void OnPaymentPopup(DataMonthJeka3 currentMonth)
    {
        if (paymentPopup.gameObject.activeSelf)
        {
            paymentPopup.Close();
            return;
        }

        if (!paymentPopup.gameObject.activeSelf && !GuiWindow.AnyTaskFor(paymentPopup))
        {
            GuiWindow.Add(paymentPopup, new object[] { currentMonth });
            IsOpenWindows = true;
        }
    }