void AutoFillFocusNichesByIndustry(GameEntity company) { var niches = Markets.GetNichesInIndustry(company.companyFocus.Industries[0], Q); foreach (var n in niches) { Companies.AddFocusNiche(company, n.niche.NicheType, Q); } }
void AutoFillSomeFocusNichesByIndustry(GameEntity company) { var niches = Markets.GetNichesInIndustry(company.companyFocus.Industries[0], Q); //CompanyUtils.AddFocusNiche(RandomEnum<NicheComponent>.PickRandomItem(niches).NicheType, company); foreach (var n in niches) { Companies.AddFocusNiche(company, n.niche.NicheType, Q); } }
public override void Execute() { var niche = ScreenUtils.GetSelectedNiche(Q); bool isInSphereOfInterest = Companies.IsInSphereOfInterest(MyCompany, niche); if (isInSphereOfInterest) { Companies.RemoveFromSphereOfInfluence(niche, MyCompany, Q); } else { Companies.AddFocusNiche(niche, MyCompany, Q); } }
void PrepareMarket(GameEntity niche, long startCapital) { // spawn competitors for (var i = 0; i < 1; i++) { var c = Markets.SpawnCompany(niche, Q, Random.Range(2, 5) * startCapital); //MarketingUtils.AddClients(c, MarketingUtils.GetClients(c) * Random.Range(1, 1.5f)); Marketing.AddBrandPower(c, 10); } // spawn investors for (var i = 0; i < 1; i++) { var fund = Companies.GenerateInvestmentFund(Q, RandomUtils.GenerateInvestmentCompanyName(), 500000); Companies.AddFocusNiche(niche.niche.NicheType, fund, Q); } }
void AddRandomNiche(GameEntity group) { foreach (var industry in group.companyFocus.Industries) { var suitableNiches = GetSuitableMarkets(group, industry).ToArray(); var count = suitableNiches.Count(); if (count == 0) { continue; } var rand = Random.Range(0, count); var niche = suitableNiches[rand].niche.NicheType; Companies.AddFocusNiche(niche, group, gameContext); break; } }