Ejemplo n.º 1
0
    private void UpdateResources()
    {
        float player1Resources = player1State.GetMoney();
        float player2Resources = player2State.GetMoney();

        resourcesChart.SetLeftValue(NormalizedRatio(player1Resources, player2Resources));
    }
Ejemplo n.º 2
0
    private void Start()
    {
        worldStateManager = UIManager.Instance.worldStateManager;

        player1 = UIManager.Instance.player1;
        player2 = UIManager.Instance.player2;

        player1State = worldStateManager.GetPlayerState(player1.id);
        player2State = worldStateManager.GetPlayerState(player2.id);

        scoreBar.SetLeftValue(50);

        defaultDetailsPosition = detailsTransform.anchoredPosition;

        scoreBar.OnClick += ScoreBar_OnClick;
    }
Ejemplo n.º 3
0
    private void UpdateEfficiency()
    {
        float player1Efficiency = worldStateManager.GetEfficiency(player1.id);
        float player2Efficiency = worldStateManager.GetEfficiency(player2.id);

        efficiencyChart.SetLeftValue(NormalizedRatio(player1Efficiency, player2Efficiency));
    }
Ejemplo n.º 4
0
    private void UpdateFiltered()
    {
        float player1Filtered = player1State.GetAccumulatedPollutionMap(PollutionMapType.FILTERED).GetTotalPollution();
        float player2Filtered = player2State.GetAccumulatedPollutionMap(PollutionMapType.FILTERED).GetTotalPollution();

        filteredChart.SetLeftValue(NormalizedRatio(player1Filtered, player2Filtered));
    }
Ejemplo n.º 5
0
    private void UpdateTotal()
    {
        float player1Total = player1State.GetAccumulatedPollutionMap(PollutionMapType.NET).GetTotalPollution();
        float player2Total = player2State.GetAccumulatedPollutionMap(PollutionMapType.NET).GetTotalPollution();

        totalChart.SetLeftValue(NormalizedRatio(player1Total, player2Total));
    }
Ejemplo n.º 6
0
    private void UpdatePollution()
    {
        float player1Pollution = player1State.GetAccumulatedPollutionMap(PollutionMapType.PRODUCED).GetTotalPollution();
        float player2Pollution = player2State.GetAccumulatedPollutionMap(PollutionMapType.PRODUCED).GetTotalPollution();


        producedChart.SetLeftValue(NormalizedRatio(player1Pollution, player2Pollution));
    }