TrackPlayerCount
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
OnCountChanged
ReachedFallPlayerCount
ReachedPlayerCount
executeEventAtPlayerCount
fallBelowCount
isOwner
reachPlayerCount
teamName
texts
useRoomOwnerShip
OnCountChanged
UnityEvent. Called when the player count changes
| Exposed Value | Type | Default Value |
|---|---|---|
| public | IntUnityEvent | new IntUnityEvent() |
ReachedFallPlayerCount
UnityEvent. Called when you hit the
fallBelowCountwhen you were originally at a higher value.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | UnityEvent | new UnityEvent() |
ReachedPlayerCount
UnityEvent. Called when you reach the specified
reachPlayerCount.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | UnityEvent | new UnityEvent() |
executeEventAtPlayerCount
Trigger the ReachPlayerCount unityevent when the player count = reachPlayerCount.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | false |
fallBelowCount
The number of players to fall to to excute the ReachedFallPlayerCount UnityEvent.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | int | 2 |
isOwner
Excute if are you/are not the owner.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | false |
reachPlayerCount
The number of players to reach before executing this ReachPlayerCount UnityEvent.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | int | 4 |
teamName
If you ony want to count the number of players that are on a certain team.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | ”” |
texts
The series of text objects to modify with the number of players in the room.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text[] | new Text[] { } |
useRoomOwnerShip
Only execute these unity events based on whether or not you’re the room owner.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | false |
Function Definitions
Select the function name from below to jump directly to it on this page.
DisplayCount
EnableReachPlayerCountEvent
SetText
Update
protected virtual void DisplayCount(int count)
Calls the
SetTextfunction to set the values of thetextsto be what the current input count is. If the input count was different from the last time you called this function it will execute theOnCountChangedUnityEvent.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| count | int type, the count to display on all the texts. |
public virtual void EnableReachPlayerCountEvent(bool isEnabled)
Used to make sure that the fall and reached unity events are fired only once. This is calls as part of the
Updatefunction.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| isEnabled | *No found decription |
protected virtual void SetText(string inputText)
Sets the value of the
textsto be whatever the input value is.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| inputText | string type, the string to display on all the texts |
protected virtual void Update()
Dynamically sets the
textsvalues to be what the currented connected player count is. Will only update these values if you’re currently connected to a photon room. Will call theReachedFallPlayerCountandReachedPlayerCountUnityEvents.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters