Example #1
0
        /// <summary>
        /// Анализирует успешность концерта
        /// </summary>
        public override void Analyze(ConcertInfo concert)
        {
            var totalFans         = PlayerManager.Data.Fans;
            var albumInfo         = ProductionManager.GetAlbum(concert.AlbumId);
            var sameConcertsCount = ProductionManager.SameConcertsCount(concert.AlbumId);

            var sameConcertImpact = sameConcertCurve.Evaluate(sameConcertsCount);
            var albumImpact       = ticketsFromAlbumCurve.Evaluate(albumInfo.ChartPosition);
            var hypeImpact        = hypeImpactMultiplier * PlayerManager.Data.Hype;
            var resultPoints      = fansToPointsIncomeCurve.Evaluate(totalFans) * (concert.ManagementPoints + concert.MarketingPoints);

            concert.TicketsSold = (int)ticketsSoldCurve.Evaluate(sameConcertImpact * albumImpact * hypeImpact * resultPoints);

            var fansIncomeFromVisitors = fansIncomeCurve.Evaluate(totalFans) * concert.TicketsSold;

            concert.FansIncome  = (int)fansIncomeFromVisitors;
            concert.MoneyIncome = concert.Income;
        }