Пример #1
0
    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);
        }
    }
Пример #2
0
    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);
        }
    }
Пример #3
0
    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);
        }
    }
Пример #4
0
    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;
        }
    }