private void UpdateResources() { float player1Resources = player1State.GetMoney(); float player2Resources = player2State.GetMoney(); resourcesChart.SetLeftValue(NormalizedRatio(player1Resources, player2Resources)); }
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; }
private void UpdateEfficiency() { float player1Efficiency = worldStateManager.GetEfficiency(player1.id); float player2Efficiency = worldStateManager.GetEfficiency(player2.id); efficiencyChart.SetLeftValue(NormalizedRatio(player1Efficiency, player2Efficiency)); }
private void UpdateFiltered() { float player1Filtered = player1State.GetAccumulatedPollutionMap(PollutionMapType.FILTERED).GetTotalPollution(); float player2Filtered = player2State.GetAccumulatedPollutionMap(PollutionMapType.FILTERED).GetTotalPollution(); filteredChart.SetLeftValue(NormalizedRatio(player1Filtered, player2Filtered)); }
private void UpdateTotal() { float player1Total = player1State.GetAccumulatedPollutionMap(PollutionMapType.NET).GetTotalPollution(); float player2Total = player2State.GetAccumulatedPollutionMap(PollutionMapType.NET).GetTotalPollution(); totalChart.SetLeftValue(NormalizedRatio(player1Total, player2Total)); }
private void UpdatePollution() { float player1Pollution = player1State.GetAccumulatedPollutionMap(PollutionMapType.PRODUCED).GetTotalPollution(); float player2Pollution = player2State.GetAccumulatedPollutionMap(PollutionMapType.PRODUCED).GetTotalPollution(); producedChart.SetLeftValue(NormalizedRatio(player1Pollution, player2Pollution)); }