void CheckStateChanged(Plateau.pState state) { foreach (Plateau.pState activeState in plateauActiveStates) { if (activeState == state) { gameObject.SetActive(true); return; } } gameObject.SetActive(false); }
void ChangeStateText(Plateau.pState state) { string s = null; if (state == Plateau.pState.gameOver) { s = gameOverText.text; s = Plateau.Instance.ScoreJ1 > Plateau.Instance.ScoreJ2 ? s.Replace("#", "1") : s.Replace("#", "2"); gameOverText.text = s; return; } if (!stateToTextDic.ContainsKey(state)) { return; } s = stateToTextDic[state]; s = s.Replace("#", (Plateau.Instance.PlayerNumber + 1).ToString()); stateText.text = s; }