public override string RenderValue()
    {
        NicheType    NicheType    = ScreenUtils.GetSelectedNiche(Q);
        IndustryType IndustryType = Markets.GetIndustry(NicheType, Q);

        return(Visuals.Link("Is part of " + Enums.GetFormattedIndustryName(IndustryType) + " industry"));
    }
    public override void ViewRender()
    {
        base.ViewRender();

        var niche = ScreenUtils.GetSelectedNiche(Q);

        var costs = Markets.GetNicheCosts(Q, niche);

        IdeasCost.text = "???";
        TechCost.text  = Format.Minify(costs.TechCost);
        SalesCost.text = "????";

        AdCost.text = Format.Minify(costs.AcquisitionCost);
    }
    GameEntity[] GetProductsOnNiche()
    {
        var niche = ScreenUtils.GetSelectedNiche(Q);

        var list = Markets.GetProductsOnMarket(Q, niche).ToArray();

        Array.Sort(list, SortCompanies);

        //string names = String.Join(",", list.Select(e => e.product.Name).ToArray());

        //Debug.Log("Rendering companies: " + names);

        return(list);
    }
Exemple #4
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);
        }
    }
Exemple #5
0
    public override void Execute()
    {
        NicheType nicheType = ScreenUtils.GetSelectedNiche(Q);

        NotificationUtils.AddPopup(Q, new PopupMessageDoYouWantToCreateApp(nicheType));
    }
    public void Render()
    {
        NicheType nicheType = ScreenUtils.GetSelectedNiche(Q);
        var       niche     = Markets.GetNiche(Q, nicheType);

        var profile = niche.nicheBaseProfile.Profile;

        var rating = Markets.GetMarketRating(niche);

        SetAmountOfStars.SetStars(rating);

        var speed = profile.NicheSpeed;
        //var iteration = (int)speed;
        //ChangeSpeed.text = $"{iteration} months";

        var iteration = Products.GetBaseIterationTime(niche);

        //var iteration = speed.ToString();
        ChangeSpeed.text = iteration + " days";

        PotentialMarketSize.text   = Format.Money(Markets.GetMarketPotential(niche));
        PotentialAudienceSize.text = Format.MinifyToInteger(Markets.GetMarketAudiencePotential(niche)) + " users";

        var    risk     = Markets.GetMarketDemandRisk(Q, nicheType);
        string riskText = Markets.ShowRiskStatus(risk).ToString();

        RiskLabel.text = $"{risk}% ({riskText})";

        var demand = Marketing.GetClientFlow(Q, nicheType); // * MarketingUtils.GetMarketingFinancingAudienceReachModifier(MarketingFinancing.High) * 30;

        Demand.text = Format.MinifyToInteger(demand) + " monthly";

        var baseMaintenance = Markets.GetBaseProductMaintenance(Q, niche);

        Maintenance.text = Format.MinifyMoney(baseMaintenance) + " / month";

        //var teamMaintenance = NicheUtils.GetTeamMaintenanceCost(niche);
        //TeamMaintenance.text = Format.MoneyToInteger(teamMaintenance) + " / month";

        TeamMaintenance.text = profile.AppComplexity.ToString();

        long maxIncome = 0;

        if (BiggestIncome != null)
        {
            var players = Markets.GetProductsOnMarket(Q, niche.niche.NicheType);


            if (players.Count() == 0)
            {
                BiggestIncome.text = "???";
            }
            else
            {
                maxIncome          = players.Max(p => Economy.GetCompanyIncome(Q, p));
                BiggestIncome.text = Format.Money(maxIncome) + " / month";
            }
        }

        var start = Markets.GetStartCapital(niche, Q);

        if (StartCapital != null)
        {
            StartCapital.text = Format.Money(start);

            var showStartCapital = !Companies.HasCompanyOnMarket(MyCompany, nicheType, Q);

            StartCapital.gameObject.SetActive(showStartCapital);
            StartCapitalLabel.gameObject.SetActive(showStartCapital);
        }

        //var monthlyMaintenance = marketingMaintenance + teamMaintenance;
        //if (MonthlyMaintenance != null)
        //    MonthlyMaintenance.text = Format.Money(monthlyMaintenance) + " / month";

        //if (ROI != null)
        //{
        //    var roi = (maxIncome - monthlyMaintenance) * 100 * 12 / (monthlyMaintenance + 1);
        //    ROI.text = $"{roi}% / yearly";
        //}
    }
Exemple #7
0
    void OnEnable()
    {
        var industry = Markets.GetIndustry(ScreenUtils.GetSelectedNiche(Q), Q);

        GetComponent <LinkToResearchView>().SetIndustry(industry);
    }
 public override string RenderValue()
 {
     return("Market of " + Enums.GetFormattedNicheName(ScreenUtils.GetSelectedNiche(Q)));
 }
Exemple #9
0
 void SetPanelColor()
 {
     Panel.color = GetPanelColor(niche.niche.NicheType == ScreenUtils.GetSelectedNiche(Q));
 }