Table of Contents

Class PlayerHandler

Namespace
DefaultNamespace
Assembly
Assembly-CSharp.dll
public class PlayerHandler : MonoBehaviour
Inheritance
PlayerHandler
Inherited Members
Extension Methods

Constructors

PlayerHandler()

public PlayerHandler()

Fields

OnPlayerJoined

public Action<Player> OnPlayerJoined

Field Value

Action<Player>

OnPlayerLeft

public Action<Player> OnPlayerLeft

Field Value

Action<Player>

instance

public static PlayerHandler instance

Field Value

PlayerHandler

players

public List<Player> players

Field Value

List<Player>

playersAlive

public List<Player> playersAlive

Field Value

List<Player>

Methods

AddPlayer(Player)

public void AddPlayer(Player player)

Parameters

player Player

AllPlayersAsleep()

public bool AllPlayersAsleep()

Returns

bool

AllPlayersInBed()

public bool AllPlayersInBed()

Returns

bool

Awake()

public void Awake()

CanAnAlivePlayerSeePoint(Vector3, out Player, Player)

public bool CanAnAlivePlayerSeePoint(Vector3 point, out Player firstPlayerThatCanSeeIt, Player ignoredPlayer = null)

Parameters

point Vector3
firstPlayerThatCanSeeIt Player
ignoredPlayer Player

Returns

bool

FindClosest(Vector3, List<Player>)

public static Player FindClosest(Vector3 point, List<Player> players)

Parameters

point Vector3
players List<Player>

Returns

Player

FindClosestPlayerToPlayer(Player)

public Player FindClosestPlayerToPlayer(Player player)

Parameters

player Player

Returns

Player

FindClosestPlayerToPlayer(Player, out float)

public Player FindClosestPlayerToPlayer(Player player, out float closestDistance)

Parameters

player Player
closestDistance float

Returns

Player

GetAlivePlayersWithinFlatDistanceFromPoint(Vector3, float)

public List<Player> GetAlivePlayersWithinFlatDistanceFromPoint(Vector3 point, float distance)

Parameters

point Vector3
distance float

Returns

List<Player>

GetClosestAlivePlayerToPoint(Vector3, bool, float)

public Player GetClosestAlivePlayerToPoint(Vector3 point, bool requireVision = false, float maxRange = 3.4028235E+38)

Parameters

point Vector3
requireVision bool
maxRange float

Returns

Player

GetFurthestPlayerFromPlayer(Player)

public Player GetFurthestPlayerFromPlayer(Player player)

Parameters

player Player

Returns

Player

GetLargestClosestDistanceBetweenPlayers(out float, out Player)

public bool GetLargestClosestDistanceBetweenPlayers(out float maxMinDistanceBetweenPlayers, out Player mostAlonePlayer)

Parameters

maxMinDistanceBetweenPlayers float
mostAlonePlayer Player

Returns

bool

GetNextPlayer(ref int)

public Player GetNextPlayer(ref int currentPlayerCheckID)

Parameters

currentPlayerCheckID int

Returns

Player

GetNextPlayerAlive(Player, int)

public Player GetNextPlayerAlive(Player currenPlayer = null, int offset = 1)

Parameters

currenPlayer Player
offset int

Returns

Player

GetNextPlayerAlive(ref int, int)

public Player GetNextPlayerAlive(ref int currentPlayerCheckID, int offset = 1)

Parameters

currentPlayerCheckID int
offset int

Returns

Player

GetPlayerID(Player)

public int GetPlayerID(Player currenPlayer)

Parameters

currenPlayer Player

Returns

int

GetPlayersClosestDistanceToAnotherPlayer(Player)

public float GetPlayersClosestDistanceToAnotherPlayer(Player player)

Parameters

player Player

Returns

float

GetRandomPlayerAlive()

public Player GetRandomPlayerAlive()

Returns

Player

PlayerVoiceVolumeAtPosition(Vector3, float, float)

public float PlayerVoiceVolumeAtPosition(Vector3 position, float minRange, float maxRange)

Parameters

position Vector3
minRange float
maxRange float

Returns

float

RemovePlayer(Player)

public void RemovePlayer(Player player)

Parameters

player Player

TryGetPlayerFromOwnerID(int, out Player)

public bool TryGetPlayerFromOwnerID(int photonViewOwnerActorNr, out Player o)

Parameters

photonViewOwnerActorNr int
o Player

Returns

bool

TryGetPlayerFromViewID(int)

public Player TryGetPlayerFromViewID(int viewID)

Parameters

viewID int

Returns

Player