public string Info() { foreach (Square square in BoardList) { finalString += square.Info(); } foreach (Square YellowSquare in BoardListYellow) { finalString += YellowSquare.Info(); } foreach (Square RedSquare in BoardListRed) { finalString += RedSquare.Info(); } foreach (Square GreenSquare in BoardListGreen) { finalString += GreenSquare.Info(); } foreach (Square BlueSquare in BoardListBlue) { finalString += BlueSquare.Info(); } return(finalString); }
void Update() { if (Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow)) { if (characterselect == 1) { characterselect = 2; } else if (characterselect == 2) { characterselect = 1; } } if (characterselect == 1) { RedSquare.SetActive(true); BlueSquare.SetActive(false); } else if (characterselect == 2) { RedSquare.SetActive(false); BlueSquare.SetActive(true); } }