private void ComputeNewState() { ENeedState needState = ENeedState.SATISFIED; if (IsValueInState(ENeedState.DEPLETED)) { needState = ENeedState.DEPLETED; } else if (IsValueInState(ENeedState.CRITICAL)) { needState = ENeedState.CRITICAL; } else if (IsValueInState(ENeedState.LOW)) { needState = ENeedState.LOW; } State = needState; }
private void UpdateGaugeColor(ENeedState needState) { m_gaugeFill.color = m_needStateDisplayData.GetColorForState(needState); }
private bool IsValueInState(ENeedState needState) { return(Satisfaction <= (float)needState); }
public Color GetColorForState(ENeedState needState) { return(m_dataSet[needState]); }