Example #1
0
    public override void Execute()
    {
        var company = Flagship;

        var positioning = FindObjectOfType <PositioningManagerView>().Positioning;

        Marketing.ChangePositioning(company, Q, positioning.ID);
    }
    public override void Execute()
    {
        Marketing.ChangePositioning(Flagship, Q, positioningId);

        FindObjectOfType <PositioningVariantsListView2>().ViewRender();
    }
Example #3
0
    void RenderPositioningChangeBenefit()
    {
        var product        = Flagship;
        var audienceChange = (double)Marketing.GetAudienceChange(product, Q);


        var audienceGrowth = (double)Marketing.GetAudienceGrowth(product, Q);

        // Fake positioning change -------------------
        var positioning = Marketing.GetPositioning(product);

        Marketing.ChangePositioning(product, Positioning.ID);
        var newAudienceGrowth = (double)Marketing.GetAudienceGrowth(product, Q);

        var companies = Companies.GetCompetitionInSegment(product, Q, Positioning.ID, true);

        //var newBestAppQuality = Marketing
        Marketing.ChangePositioning(product, positioning.ID);
        // --------------------------------

        var incomePerUser    = Economy.GetIncomePerUser(product, 0) * C.PERIOD / 30; //  0.05d;
        var newIncomePerUser = incomePerUser;

        bool noCompetitors = companies.Count() == 0;

        if (noCompetitors)
        {
            newAudienceGrowth *= 2;
        }


        var incomeGrowth    = Convert.ToInt64((audienceGrowth * incomePerUser));
        var newIncomeGrowth = Convert.ToInt64(newAudienceGrowth * newIncomePerUser);


        var situation = $"Your income grows by {Format.Money(incomeGrowth)} every week (by getting {Format.Minify(audienceGrowth)} users).";

        ChangeGain.text = situation;

        var incomeChange         = newIncomeGrowth - incomeGrowth;
        var audienceGrowthChange = newAudienceGrowth - audienceGrowth;

        if (newAudienceGrowth != audienceGrowth)
        {
            ChangeGain.text += $"\nAfter positioning change you will ";

            if (newAudienceGrowth > audienceGrowth)
            {
                var incomeGainDescription   = "+" + Format.Money(incomeChange) + " / week";
                var audienceGainDescription = "+" + Format.Minify(audienceGrowthChange) + " users";

                ChangeGain.text += $"<b>GET</b> additional <b>{Visuals.Positive(incomeGainDescription)}</b> (by getting <b>additional</b> {Visuals.Positive(audienceGainDescription)})";
            }

            if (newAudienceGrowth < audienceGrowth)
            {
                var incomeGainDescription   = Format.Money(-incomeChange) + " / week";
                var audienceGainDescription = Format.Minify(-audienceGrowthChange) + " users";

                ChangeGain.text += $"<b>LOSE</b> <b>{Visuals.Negative(incomeGainDescription)}</b> (by losing {Visuals.Negative(audienceGainDescription)})";
            }
        }
        else
        {
            ChangeGain.text += Visuals.Colorize("\nThis is our current positioning", Colors.COLOR_CONTROL);
        }


        // Competition --------------------
        if (noCompetitors)
        {
            ChangeGain.text += "\n" + Visuals.Positive("There are NO competitors, so you will get <b>TWICE</b> more users!");
        }
        // -------------------------
        //if (newAudienceGrowth == audienceGrowth)
        //{
        //    ChangeGain.text += $""
        //}
    }