Photon Unity Networking 2  v2.1
English | 日本語 | 한국
Static Public Member Functions | List of all members
PhotonTeamExtensions Class Reference

PunTeamsおよびPlayerクラスに使用される拡張機能。 プレイヤーのカスタムプロパティへのアクセスをラップします。 More...

Static Public Member Functions

static PhotonTeam GetPhotonTeam (this Player player)
 プレイヤーが現在参加しているチームを取得します。ない場合はnull。 More...
 
static bool JoinTeam (this Player player, PhotonTeam team)
 チームに参加。 More...
 
static bool JoinTeam (this Player player, byte teamCode)
 チームコードを使用してチームに参加。 More...
 
static bool JoinTeam (this Player player, string teamName)
 チーム名を使用してチームに参加。 More...
 
static bool SwitchTeam (this Player player, PhotonTeam team)
 そのプレイヤーのチームをあなたが割り当てたチームに切り替えます。 More...
 
static bool SwitchTeam (this Player player, byte teamCode)
 チームコードを使用してプレイヤーのチームを切り替えます。 More...
 
static bool SwitchTeam (this Player player, string teamName)
 チーム名を使用してプレイヤーのチームを切り替えます。 More...
 
static bool LeaveCurrentTeam (this Player player)
 存在する場合、現在のチームを去る。 More...
 
static bool TryGetTeamMates (this Player player, out Player[] teamMates)
 チームメイトの取得を試みる。 More...
 

Detailed Description

PunTeamsおよびPlayerクラスに使用される拡張機能。 プレイヤーのカスタムプロパティへのアクセスをラップします。

Member Function Documentation

static PhotonTeam GetPhotonTeam ( this Player  player)
static

プレイヤーが現在参加しているチームを取得します。ない場合はnull。

Returns
プレイヤーが現在参加しているチーム。ない場合はnull。
static bool JoinTeam ( this Player  player,
PhotonTeam  team 
)
static

チームに参加。

Parameters
playerチームに参加するプレイヤー。
team参加するチーム。
Returns
static bool JoinTeam ( this Player  player,
byte  teamCode 
)
static

チームコードを使用してチームに参加。

Parameters
playerチームに参加するプレイヤー。
teamCodeThe code fo 参加するチーム。
Returns
static bool JoinTeam ( this Player  player,
string  teamName 
)
static

チーム名を使用してチームに参加。

Parameters
playerチームに参加するプレイヤー。
teamName参加するチームの名前。
Returns
static bool LeaveCurrentTeam ( this Player  player)
static

存在する場合、現在のチームを去る。

Parameters
player
Returns
脱退するチームのリクエストがキューに入れられてサーバーに送信されるか、オフラインの場合やまだルームに参加していないか。
static bool SwitchTeam ( this Player  player,
PhotonTeam  team 
)
static

そのプレイヤーのチームをあなたが割り当てたチームに切り替えます。

このプレイヤーが既にそのチームに所属しているかどうかを内部的に確認します。チームの切り替えのみが実際に送信されます。

Parameters
player
team
static bool SwitchTeam ( this Player  player,
byte  teamCode 
)
static

チームコードを使用してプレイヤーのチームを切り替えます。

このプレイヤーが既にそのチームに所属しているかどうかを内部的に確認します。

Parameters
playerチームを切り替えるプレイヤー。
teamCode切り替えるチームのコード。
Returns
チーム切り替え要求がキューに入れられてサーバーに送信されるか、オフラインの場合やまだルームに参加していない場合に実行されます。
static bool SwitchTeam ( this Player  player,
string  teamName 
)
static

チーム名を使用してプレイヤーのチームを切り替えます。

このプレイヤーが既にそのチームに所属しているかどうかを内部的に確認します。

Parameters
playerチームを切り替えるプレイヤー。
teamName切り替えるチームの名前
Returns
チーム切り替え要求がキューに入れられてサーバーに送信されるか、オフラインの場合やまだルームに参加していない場合に実行されます。
static bool TryGetTeamMates ( this Player  player,
out Player[]  teamMates 
)
static

チームメイトの取得を試みる。

Parameters
playerチームメイトを取得するプレイヤー。
teamMates埋めるチームメイト配列。
Returns
成功したかどうか