mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-26 02:00:54 -05:00
Merge branch 'spectateCamera'
This commit is contained in:
commit
8ddb2188de
|
|
@ -355,8 +355,8 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_text: Ready?
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontAsset: {fileID: 11400000, guid: c9c6ab728bbf8974783d3354922a042f, type: 2}
|
||||
m_sharedMaterial: {fileID: -1126714427571281196, guid: c9c6ab728bbf8974783d3354922a042f, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class EndCollider : NetworkBehaviour {
|
|||
// Then grab their GUID
|
||||
if (ServerGameNetPortal.Instance.clientIdToGuid.TryGetValue(character.GetComponent<NetworkObject>().OwnerClientId, out string clientGuid)) {
|
||||
// To verify they aren't the king
|
||||
if (ServerGameNetPortal.Instance.clientData[clientGuid].IsKing != true) {
|
||||
if (ServerGameNetPortal.Instance.clientData[clientGuid].IsKing == true) {
|
||||
// Then call a client rpc to the finished player to enable the camera locally
|
||||
ClientRpcParams clientRpcParams = new ClientRpcParams {
|
||||
Send = new ClientRpcSendParams {
|
||||
|
|
@ -83,12 +83,12 @@ public class EndCollider : NetworkBehaviour {
|
|||
|
||||
foreach (GameObject character in playableCharacters) {
|
||||
if (character.GetComponent<NetworkObject>().OwnerClientId == otherRunnerClientID) {
|
||||
GameObject UICamera = GameHandler.FindGameObjectInChildWithTag(character, "UICam");
|
||||
//GameObject UICamera = GameHandler.FindGameObjectInChildWithTag(character, "UICam");
|
||||
|
||||
//GameHandler.FindGameObjectInChildWithTag(character, "UICam").GetComponent<Camera>().enabled = true;
|
||||
GameHandler.FindGameObjectInChildWithTag(UICamera, "PlayerCam").GetComponent<Camera>().enabled = true;
|
||||
GameHandler.FindGameObjectInChildWithTag(UICamera, "PlayerCam").GetComponent<PlayerCam>().enabled = false;
|
||||
GameHandler.FindGameObjectInChildWithTag(UICamera, "PlayerCam").GetComponent<AudioListener>().enabled = true;
|
||||
GameHandler.FindGameObjectInChildWithTag(character, "PlayerCam").GetComponent<Camera>().enabled = true;
|
||||
//GameHandler.FindGameObjectInChildWithTag(UICamera, "PlayerCam").GetComponent<Camera>().enabled = true;
|
||||
//GameHandler.FindGameObjectInChildWithTag(UICamera, "PlayerCam").GetComponent<PlayerCam>().enabled = false;
|
||||
GameHandler.FindGameObjectInChildWithTag(character, "PlayerCam").GetComponent<AudioListener>().enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user