Extension methods for the Player class that make use of PhotonTeamsManager.
More...
Extension methods for the Player class that make use of PhotonTeamsManager.
◆ GetPhotonTeam()
Gets the team the player is currently joined to. Null if none.
- Returns
- The team the player is currently joined to. Null if none.
◆ JoinTeam() [1/3]
static bool JoinTeam |
( |
this Player |
player, |
|
|
byte |
teamCode |
|
) |
| |
|
static |
Join a team using team code.
- Parameters
-
player | The player who will join the team. |
teamCode | The code fo the team to be joined. |
- Returns
◆ JoinTeam() [2/3]
Join a team.
- Parameters
-
player | The player who will join a team. |
team | The team to be joined. |
- Returns
◆ JoinTeam() [3/3]
static bool JoinTeam |
( |
this Player |
player, |
|
|
string |
teamName |
|
) |
| |
|
static |
Join a team using team name.
- Parameters
-
player | The player who will join the team. |
teamName | The name of the team to be joined. |
- Returns
◆ LeaveCurrentTeam()
static bool LeaveCurrentTeam |
( |
this Player |
player | ) |
|
|
static |
Leave the current team if any.
- Parameters
-
- Returns
- If the leaving team request is queued to be sent to the server or done in case offline or not joined to a room yet.
◆ SwitchTeam() [1/3]
static bool SwitchTeam |
( |
this Player |
player, |
|
|
byte |
teamCode |
|
) |
| |
|
static |
Switch the player's team using a team code.
Internally checks if this player is in that team already or not.
- Parameters
-
player | The player that will switch teams. |
teamCode | The code of the team to switch to. |
- Returns
- If the team switch request is queued to be sent to the server or done in case offline or not joined to a room yet.
◆ SwitchTeam() [2/3]
Switch that player's team to the one you assign.
Internally checks if this player is in that team already or not. Only team switches are actually sent.
- Parameters
-
◆ SwitchTeam() [3/3]
static bool SwitchTeam |
( |
this Player |
player, |
|
|
string |
teamName |
|
) |
| |
|
static |
Switch the player's team using a team name.
Internally checks if this player is in that team already or not.
- Parameters
-
player | The player that will switch teams. |
teamName | The name of the team to switch to. |
- Returns
- If the team switch request is queued to be sent to the server or done in case offline or not joined to a room yet.
◆ TryGetTeamMates()
static bool TryGetTeamMates |
( |
this Player |
player, |
|
|
out Player[] |
teamMates |
|
) |
| |
|
static |
Try to get the team mates.
- Parameters
-
player | The player to get the team mates of. |
teamMates | The team mates array to fill. |
- Returns
- If successful or not.