private void Validate(bool throwError = true) { if (pInterfaceHolder.childCount != activePlayers.Count) { if (throwError) { Debug.LogError(this.GetType().FullName + ": Missmatch in nr displayed players and actual players. (Graphics: " + pInterfaceHolder.childCount.ToString() + ", Players: " + activePlayers.Count); } } PlayHandler.SetNextButtonsActive(activePlayers.Count > 0); }
private void Validate() { SetSelectionInterface[] interfaces = interfaceHolder.GetComponentsInChildren <SetSelectionInterface>(); if (interfaces.Length == 0) { ConfirmScreen.Create().Set("Error! No sets exist, something went wrong.", Application.Quit, useCancel: false); } int nrOn = 0; for (int i = 0; i < interfaces.Length; i++) { nrOn += interfaces[i].IsOn ? 1 : 0; } PlayHandler.SetNextButtonsActive(interfaces.Length > 0 && nrOn > 0); }