mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
changes GetPlayerPosition to GetPlayerBody and GetPlayerCamera
This commit is contained in:
parent
3d682063e7
commit
1aafd306bc
@ -38,11 +38,16 @@ public interface IQSBAPI
|
||||
string GetPlayerName(uint playerID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the position of a given player.
|
||||
/// This position is in world space, where (0, 0, 0) is roughly where the local player is located.
|
||||
/// Returns the body object of a given player. The pivot of this object is at the player's feet.
|
||||
/// </summary>
|
||||
/// <param name="playerID">The ID of the player you want the position of.</param>
|
||||
Vector3 GetPlayerPosition(uint playerID);
|
||||
/// <param name="playerID">The ID of the player you want the body of.</param>
|
||||
GameObject GetPlayerBody(uint playerID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the camera object of a given player. The pivot of this object is at the player's point of view.
|
||||
/// </summary>
|
||||
/// <param name="playerID">The ID of the player you want the camera of.</param>
|
||||
GameObject GetPlayerCamera(uint playerID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if a given player has fully loaded into the game. If the local player is still loading into the game, this will return false.
|
||||
|
@ -25,7 +25,8 @@ public class QSBAPI : IQSBAPI
|
||||
|
||||
public uint GetLocalPlayerID() => QSBPlayerManager.LocalPlayerId;
|
||||
public string GetPlayerName(uint playerId) => QSBPlayerManager.GetPlayer(playerId).Name;
|
||||
public Vector3 GetPlayerPosition(uint playerId) => QSBPlayerManager.GetPlayer(playerId).Body.transform.position;
|
||||
public GameObject GetPlayerBody(uint playerId) => QSBPlayerManager.GetPlayer(playerId).Body;
|
||||
public GameObject GetPlayerCamera(uint playerId) => QSBPlayerManager.GetPlayer(playerId).CameraBody;
|
||||
|
||||
public bool GetPlayerReady(uint playerId)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user