public void JoinGame() { if (HasJoinedGame) { return; } StartToJoinPanel.SetActive(false); JoinedGamePanel.SetActive(true); // Unready IsReady = false; // Create the Cursor Cursor = Instantiate <CursorController>(Lobby.CursorPrefab, transform.position, transform.rotation); Cursor.transform.SetParent(Lobby.transform); Cursor.PlayerPanel = this; Cursor.CursorImage.color = PlayerInfo.EmbellishmentColor; Cursor.OnClick += Cursor_OnClick; }
public void LeaveGame() { if (!HasJoinedGame) { return; } StartToJoinPanel.SetActive(true); JoinedGamePanel.SetActive(false); // If we have already cast a vote, get rid of it if (VoteCast != null) { VoteCast.TotalVotes--; } // Unready IsReady = false; // Destroy the Cursor Destroy(Cursor.gameObject); }