CharacterUI.UpdateMovementPoints C# (CSharp) Method

UpdateMovementPoints() public method

public UpdateMovementPoints ( ) : void
return void
    void UpdateMovementPoints()
    {
        Color colorActive = new Color(1, 1, 1, 1);
        Color colorEmpty = new Color(0.5f, 0.5f, 0.5f, 0.3f);

        if (_character != null)
        {
            int nbPoints = _character.CurrentMovementPoints;
            for (int i = 0; i < _listMovementPoints.Count; ++i)
            {
                Color c;
                if (i < nbPoints)
                {
                    c = colorActive;
                }
                else
                {
                    c = colorEmpty;
                }
                _listMovementPoints[i].gameObject.GetComponent<Image>().color = c;
            }
        }

    }