void AnnounceMove(NetworkUser user, TeamPicker.StateType state) { string teamText = "Unassigned"; Color32 teamColor = new Color32(209, 209, 209, 255); switch (state) { case TeamPicker.StateType.Team1: teamText = "Team 1"; teamColor = new Color32(57, 255, 58, 255); break; case TeamPicker.StateType.Team2: teamText = "Team 2"; teamColor = new Color32(255, 75, 57, 255); break; default: break; } Chat.SendBroadcastChat(new Chat.SimpleChatMessage { baseToken = Util.GenerateColoredString(user.GetNetworkPlayerName().GetResolvedName(), new Color32(146, 222, 255, 255)) + " is moved to " + Util.GenerateColoredString(teamText, teamColor) }); }
public void MoveRight() { switch (State) { case TeamPicker.StateType.Team1: UITransform.anchoredPosition = new Vector2(0.0f, UITransform.anchoredPosition.y); State = TeamPicker.StateType.Unassigned; LeftButton.gameObject.SetActive(true); RightButton.gameObject.SetActive(true); break; case TeamPicker.StateType.Unassigned: UITransform.anchoredPosition = new Vector2(175.0f, UITransform.anchoredPosition.y); State = TeamPicker.StateType.Team2; RightButton.gameObject.SetActive(false); LeftButton.gameObject.SetActive(true); break; } TeamPicker.PlayerStates[Slot].State = State; AnnounceMove(Slot, TeamPicker.PlayerStates[Slot].State); }