public void SetEntity(ProductCompanyResult result) { result1 = result; var CompanyId = result.CompanyId; var product = Companies.Get(Q, CompanyId); CompanyName.text = product.company.Name; DrawProductGrowth(product, result); DrawProductStatus(); var profit = Economy.GetProfit(Q, product); Profit.text = "Profit\n" + Visuals.Colorize(Format.Money(profit), profit > 0); LinkToNiche.SetNiche(product.product.Niche); SetAggressiveMarketing.SetCompanyId(CompanyId); SetNormalMarketing.SetCompanyId(CompanyId); SetZeroMarketing.SetCompanyId(CompanyId); ReleaseApp.SetCompanyId(CompanyId); RenderMarketingButtons(CompanyId); }
void DrawProductGrowth(GameEntity product, ProductCompanyResult result) { var bonus = Marketing.GetBrandChange(product, Q); var change = bonus.Sum(); ClientGrowth.text = $"Brand\n{(int)product.branding.BrandPower} ({Visuals.PositiveOrNegativeMinified(change)})"; ClientGrowth.gameObject.GetComponent <Hint>().SetHint(bonus.ToString()); var shareChange = (long)result.MarketShareChange; var share = Companies.GetMarketShareOfCompanyMultipliedByHundred(product, Q); MarketShareChange.text = "Market share\n" + Visuals.Colorize(share.ToString(), shareChange >= 0) + "%"; }