C# 클래스 PhotonPlayer, PaperCowboys

Summarizes a "player" within a room, identified (in that room) by actorID.
Each player has a actorID, valid for that room. It's -1 until it's assigned by server.
파일 보기 프로젝트 열기: Gamieon/PaperCowboys 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
isLocal bool

공개 메소드들

메소드 설명
Equals ( object p ) : bool

Makes PhotonPlayer comparable

Find ( int ID ) : PhotonPlayer,

Try to get a specific player by id.

GetHashCode ( ) : int
PhotonPlayer ( bool isLocal, int actorID, string name ) : System.Collections

Creates a PhotonPlayer instance.

SetCustomProperties ( Hashtable propertiesToSet ) : void

Updates and synchronizes the named properties of this Player with the values of propertiesToSet.

Any player's properties are available in a Room only and only until the player disconnect or leaves. Access any player's properties by: Player.CustomProperties (read-only!) but don't modify that hashtable. New properties are added, existing values are updated. Other values will not be changed, so only provide values that changed or are new. To delete a named (custom) property of this player, use null as value. Only string-typed keys are applied (everything else is ignored). Local cache is updated immediately, other players are updated through Photon with a fitting operation. To reduce network traffic, set only values that actually changed.

ToString ( ) : string

Gives the name.

보호된 메소드들

메소드 설명
PhotonPlayer ( bool isLocal, int actorID, Hashtable properties ) : System.Collections

Internally used to create players from event Join

비공개 메소드들

메소드 설명
InternalCacheProperties ( Hashtable properties ) : void

Caches custom properties for this player.

InternalChangeLocalID ( int newID ) : void

Used internally, to update this client's playerID when assigned.

메소드 상세

Equals() 공개 메소드

Makes PhotonPlayer comparable
public Equals ( object p ) : bool
p object
리턴 bool

Find() 공개 정적인 메소드

Try to get a specific player by id.
public static Find ( int ID ) : PhotonPlayer,
ID int ActorID
리턴 PhotonPlayer,

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

PhotonPlayer() 보호된 메소드

Internally used to create players from event Join
protected PhotonPlayer ( bool isLocal, int actorID, Hashtable properties ) : System.Collections
isLocal bool
actorID int
properties Hashtable
리턴 System.Collections

PhotonPlayer() 공개 메소드

Creates a PhotonPlayer instance.
public PhotonPlayer ( bool isLocal, int actorID, string name ) : System.Collections
isLocal bool If this is the local peer's player (or a remote one).
actorID int ID or ActorNumber of this player in the current room (a shortcut to identify each player in room)
name string Name of the player (a "well known property").
리턴 System.Collections

SetCustomProperties() 공개 메소드

Updates and synchronizes the named properties of this Player with the values of propertiesToSet.
Any player's properties are available in a Room only and only until the player disconnect or leaves. Access any player's properties by: Player.CustomProperties (read-only!) but don't modify that hashtable. New properties are added, existing values are updated. Other values will not be changed, so only provide values that changed or are new. To delete a named (custom) property of this player, use null as value. Only string-typed keys are applied (everything else is ignored). Local cache is updated immediately, other players are updated through Photon with a fitting operation. To reduce network traffic, set only values that actually changed.
public SetCustomProperties ( Hashtable propertiesToSet ) : void
propertiesToSet Hashtable Hashtable of props to udpate, set and sync. See description.
리턴 void

ToString() 공개 메소드

Gives the name.
public ToString ( ) : string
리턴 string

프로퍼티 상세

isLocal 공개적으로 프로퍼티

Only one player is controlled by each client. Others are not local.
public bool isLocal
리턴 bool