Beispiel #1
0
    public override void Execute()
    {
        ScheduleUtils.ResumeGame(Q);

        var features = Markets.GetAffordableMarketingChannels(Flagship, Q);

        var channel = features.First();

        var task = new TeamTaskChannelActivity(channel.ID, (long)channel.costPerAd);

        Teams.AddTeamTask(Flagship, CurrentIntDate, Q, 0, task);
    }
Beispiel #2
0
    void RenderMarketingButton(bool forceShow)
    {
        var channels         = Markets.GetAffordableMarketingChannels(Flagship, Q).Count();
        var isLosingAudience = Marketing.GetChurnClients(Flagship, Q) > 0;

        if (isLosingAudience)
        {
            channels += 1;
        }

        MarketingCounter.GetComponentInChildren <Text>().text = channels.ToString();


        Draw(MarketingCounter, channels > 0 || forceShow);
        Draw(MarketingButton, HasOrCompletedGoal(Flagship, InvestorGoalType.ProductFirstUsers) || forceShow);
    }
Beispiel #3
0
    public override void ViewRender()
    {
        base.ViewRender();

        var company = Flagship;

        // modal
        RenderMarketingEfficiencyInModal(company);

        CalculateROI(company);

        if (PossibleChannels != null)
        {
            Draw(PossibleChannels, !ShowAffordableOnly);
        }

        if (AllChannels != null)
        {
            Draw(AllChannels, ShowAffordableOnly);
        }

        // list
        var channels = ShowAffordableOnly ?
                       Markets.GetAffordableMarketingChannels(company, Q)
            :
                       Markets.GetTheoreticallyPossibleMarketingChannels(company);

        // ----------------------------------------------------
        var p           = Teams.GetMarketingTaskMockup();
        var activeTasks = Teams.GetActiveSameTaskTypeSlots(company, p);

        var pending = Teams.GetPendingSameTypeTaskAmount(company, p);


        AmountOfFeatures.text = $"{activeTasks}";
        if (pending > 0)
        {
            AmountOfFeatures.text += $"+{Visuals.Colorize(pending.ToString(), "orange")}";
        }

        Draw(PendingTaskIcon, pending > 0);

        AmountOfSlots.text = Visuals.Colorize((long)Teams.GetOverallSlotsForTaskType(company, p));
        // ----------------------------------------------------

        SetItems(channels.OrderByDescending(c => Marketing.GetChannelCost(company, c.ID)));
    }
    public override void ViewRender()
    {
        base.ViewRender();

        var channels = Markets.GetAffordableMarketingChannels(Flagship, Q).Take(3);

        var count = channels.Count();

        if (count == 0)
        {
            NoAvailableFeaturesText.text = Visuals.Negative($"You need more money to add more channels!");
        }

        Draw(NoAvailableFeaturesText, count == 0);

        SetItems(channels);
    }