void UpdateButtonColor(Button target, ButtonViewState state) { if (currenTournamentObject.IsNull() || currenTournamentObject.State.Equals(ChainTypes.TournamentState.Concluded)) { return; } if (target != null && target.GetComponent <UIButtonView>() != null) { target.GetComponent <UIButtonView>().UpdateColor(state); } }
public void UpdateColor(ButtonViewState state) { switch (state) { case ButtonViewState.Alternative: SetAlternativeState(); break; case ButtonViewState.Normal: SetNormalState(); break; case ButtonViewState.Hover: SetHoverState(); break; } }