public void SetFeature(NewProductFeature newProductFeature, AudiencesOnMainScreenListView audiencesOnMainScreenListView) { NewProductFeature = newProductFeature; _AudiencesOnMainScreenListView = audiencesOnMainScreenListView; ViewRender(); }
public static float GetLoyaltyChangeFromFeature(GameEntity c, NewProductFeature f, int segmentId, bool maxChange = false) { var rating = Products.GetFeatureRating(c, f.Name); var attitude = f.AttitudeToFeature[segmentId]; if (maxChange) { if (attitude <= 0) { rating = 0; } else { rating = 10; } } var loyaltyGain = 0f; if (attitude >= 0) { // is a feature loyaltyGain = rating * attitude / 10; } else { // is monetizing loyaltyGain = attitude; //loyaltyGain = attitude + (10 - rating) * attitude / 10; } return(loyaltyGain); }
public CompanyTaskUpgradeFeature(int companyId, NewProductFeature improvement) { CompanyId = companyId; CompanyTaskType = CompanyTaskType.UpgradeFeature; ProductImprovement = improvement; }
public void ShowAudienceLoyaltyChangeOnFeatureUpgrade(NewProductFeature f) { foreach (var preview in Items) { preview.GetComponent <AudiencePreview>().ShowChanges(f); } }
public static bool IsLeadingInFeature(GameEntity Flagship, NewProductFeature Feature, GameContext Q) { //var competitors = Companies.GetDirectCompetitors(Flagship, Q, true); //return IsLeadingInFeature(Flagship, Feature, Q, competitors); var index = GetAllFeaturesForProduct().ToList().FindIndex(f => f.Name == Feature.Name); return(Flagship.marketRequirements.Features[index] <= GetFeatureRating(Flagship, Feature.Name)); }
public static bool IsFeatureMaxedOut(GameEntity company, NewProductFeature f) { var ratingCap = GetFeatureRatingCap(company); var ratingGain = GetFeatureRatingGain(company); var rating = GetFeatureRating(company, f.Name); ratingCap = 10; return(rating + ratingGain > ratingCap); }
public static NewProductFeature[] GetAllFeaturesForProduct() { //Needs messaging, profiles, friends, voice chats, video chats, emojis, file sending // Test Audience, Teenagers, Adults, Middle, Old var hate = C.FEATURE_VALUE_HATE; var socialNetworkFeatures = GenerateFeatureList( new List <string> { "Messaging" }, new List <string> { "News Feed", "Friends", "Profile", "Audio chat", "Video chat" }, new List <string> { "Sending files", "Emojis", "Likes" }, 0, NewProductFeature.SimpleFeature("Ads", hate, 100), NewProductFeature.SimpleFeature("Panel for advertisers", 0, 25) ); // var gamingCompanyFeatures = GenerateFeatureList( // new List<string> {"Core game"}, // new List<string> {"Multiplayer", "Different playing strategies", "Locations"}, // new List<string> {"Website", "some feature 1"}, 25, // NewProductFeature.SimpleFeature("Ads", hate, 100), // NewProductFeature.SimpleFeature("Microtranzactions", hate / 2, 50), // NewProductFeature.SimpleFeature("Skins", hate / 5, 40) // ); //var featureList = new List<NewProductFeature>(); //switch (product.product.Niche) //{ // case NicheType.ECom_Exchanging: // featureList.Add(new NewProductFeature("")) // break; //} return(socialNetworkFeatures); }
internal void SetEntity(NewProductFeature newProductFeature) { Feature = newProductFeature; var competitors = Markets.GetProductsOnMarket(Q, Flagship); var maxLVL = Markets.GetMaxFeatureLVL(competitors, Feature.Name); // competitors.Max(c => Products.GetFeatureRating(c, Feature.Name)); var rating = Products.GetFeatureRating(Flagship, Feature.Name); //var marketRequirements = Markets.GetMarketRequirementsForCompany(Q, Flagship); //var featureIndex = Products.GetAllFeaturesForProduct().Select(f => f.Name).ToList().IndexOf(Feature.Name); var maxFeature = (int)maxLVL; // marketRequirements.Features[featureIndex]; FeatureName.text = Feature.Name; Rating.text = rating + " / " + maxFeature + "LVL"; Rating.color = Visuals.GetGradientColor(0, maxFeature, rating); RenderFeatureBenefit(rating); // Set up controller UpgradeFeatureController.SetEntity(Feature); // Hide var leader = competitors.First(c => Products.GetFeatureRating(c, Feature.Name) == maxLVL); var companyName = leader.company.Name; Leader.text = Visuals.Colorize(companyName, leader.isFlagship ? Colors.COLOR_BEST : Colors.COLOR_NEUTRAL) + "\n" + (int)maxLVL; You.text = "" + rating; Benefit.text = $"+{Visuals.Positive("5% growth")}"; var space = " "; var upgrades = competitors.Select(c => Visuals.Colorize((int)Products.GetFeatureRating(c, Feature.Name) + "", c.isFlagship ? Colors.COLOR_BEST : Colors.COLOR_NEUTRAL)); Upgrades.text = string.Join($"{space}|{space}", upgrades); Hide(Upgrades); }
private static NewProductFeature[] GenerateFeatureList(List <string> UTPs, List <string> TOPs, List <string> OKs, int randomFeatures, params NewProductFeature[] features) { var featureList = new List <NewProductFeature>(); featureList.AddRange(UTPs.Select(s => NewProductFeature.SimpleFeature(s, C.FEATURE_VALUE_UTP))); featureList.AddRange(TOPs.Select(s => NewProductFeature.SimpleFeature(s, C.FEATURE_VALUE_TOP))); featureList.AddRange(OKs.Select(s => NewProductFeature.SimpleFeature(s, C.FEATURE_VALUE_OK))); for (var i = 0; i < randomFeatures; i++) { featureList.Add(NewProductFeature.SimpleFeature($"Random feature: {i}", C.FEATURE_VALUE_OK)); } featureList.AddRange(features); // Patch with IDs for (var i = 0; i < featureList.Count; i++) { featureList[i].ID = i; } return(featureList.ToArray()); }
/*public static bool IsLeadingInFeature(GameEntity Flagship, NewProductFeature Feature, GameContext Q, IEnumerable<GameEntity> competitors) * { * //var maxLVL = competitors.Max(c => GetFeatureRating(c, Feature.Name)); * * //return GetFeatureRating(Flagship, Feature.Name) == maxLVL; * }*/ // in percents 0...15% public static float GetFeatureMaxBenefit(GameEntity product, NewProductFeature feature) { return(GetFeatureActualBenefit(10, feature)); }
public static void TryToUpgradeFeature(GameEntity product, NewProductFeature feature, GameContext gameContext) => TryToUpgradeFeature(product, feature.Name, gameContext);
public void ShowChanges(NewProductFeature f) { int change = (int)Marketing.GetLoyaltyChangeFromFeature(Flagship, f, segmentId, true); ShowChanges(change); }
internal void SetEntity(NewProductFeature feature) { this.feature = feature; }
public TeamTaskFeatureUpgrade(NewProductFeature NewProductFeature) { this.NewProductFeature = NewProductFeature; }
public static bool IsMonetizationFeature(NewProductFeature f) => f.FeatureBonus is FeatureBonusMonetization;
// feature benefits public static float GetFeatureActualBenefit(GameEntity product, NewProductFeature feature) { return(GetFeatureActualBenefit(GetFeatureRating(product, feature.Name), feature)); }
public static float GetFeatureActualBenefit(float rating, NewProductFeature feature) { return(rating * feature.FeatureBonus.Max / 10f); }
// if maxChange = true // this will return max loyalty for regular features // and worst loyalty hit for monetization features // otherwise - upgraded values? public static float GetLoyaltyChangeFromFeature(GameEntity c, NewProductFeature f) { return(100); }