From 758f06f7757abf4e7f1d84410d5edc9c02b08c03 Mon Sep 17 00:00:00 2001 From: Melbyj1125 <60886701+Melbyj1125@users.noreply.github.com> Date: Fri, 5 Nov 2021 13:07:04 -0500 Subject: [PATCH] Updated Debug prefab to be the testing version Update Inventory Selection to work with debug prefab --- .../Prefabs/Player/DebugPlayerPrefab.prefab | 2 +- Assets/Scenes/Demos/InventorySelection.unity | 114 +++++++++--------- .../DebugPlayer/DebugItems/dBlink.cs | 2 +- .../DebugPlayer/DebugItems/dDash.cs | 2 +- .../DebugPlayer/DebugItems/dGrapplingHook.cs | 2 +- .../DebugPlayer/DebugItems/dKickController.cs | 2 +- .../DebugPlayer/DebugItems/dWallRun.cs | 2 +- .../PlayerScripts/DebugPlayer/dPlayCam.cs | 2 +- .../DebugPlayer/dPlayerMovement.cs | 4 +- .../Scripts/SetInvScene/InvSceneSettings.cs | 22 ++-- UserSettings/EditorUserSettings.asset | 30 ----- 11 files changed, 77 insertions(+), 107 deletions(-) diff --git a/Assets/Prefabs/Player/DebugPlayerPrefab.prefab b/Assets/Prefabs/Player/DebugPlayerPrefab.prefab index 478d238..a34d65e 100644 --- a/Assets/Prefabs/Player/DebugPlayerPrefab.prefab +++ b/Assets/Prefabs/Player/DebugPlayerPrefab.prefab @@ -380,7 +380,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3607330906377400225} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3} m_Name: diff --git a/Assets/Scenes/Demos/InventorySelection.unity b/Assets/Scenes/Demos/InventorySelection.unity index 665bc17..e266dac 100644 --- a/Assets/Scenes/Demos/InventorySelection.unity +++ b/Assets/Scenes/Demos/InventorySelection.unity @@ -240,63 +240,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 105946287} m_CullTransparentMesh: 1 ---- !u!1001 &291813267 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_RootOrder - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.x - value: -2 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.y - value: 1.25 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890184, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_Name - value: PlayerPrefab - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} --- !u!1 &351537840 GameObject: m_ObjectHideFlags: 0 @@ -865,6 +808,63 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 878303281} m_CullTransparentMesh: 1 +--- !u!1001 &885603619 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 5633209979457551608, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_Name + value: DebugPlayerPrefab + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} --- !u!1 &1069645299 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dBlink.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dBlink.cs index afc824d..2e387d0 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dBlink.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dBlink.cs @@ -43,7 +43,7 @@ public class dBlink : NetworkBehaviour{ //blinks the player forwards private void BlinkMove() { - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } if (Input.GetMouseButton(1)) { diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs index 6c480d9..f078d9d 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs @@ -21,7 +21,7 @@ public class dDash : NetworkBehaviour{ //UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING void FixedUpdate(){ - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } if (Input.GetKeyDown(KeyCode.E)) { diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs index 8e145b4..218ce78 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs @@ -23,7 +23,7 @@ public class dGrapplingHook : NetworkBehaviour // Update is called once per frame void Update() { - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } if (Input.GetKeyDown(KeyCode.E)) //If grapple button is hit { diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs index ccce9e7..219facb 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs @@ -64,7 +64,7 @@ public class dKickController : NetworkBehaviour private void OnCollisionEnter(Collision collision) { - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } Collider myCollider = collision.contacts[0].thisCollider; if (collision.transform.CompareTag("kickable") && myCollider == leg.GetComponent()){ Vector3 direction = this.transform.forward; diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dWallRun.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dWallRun.cs index 70c9e56..c3e84c1 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dWallRun.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dWallRun.cs @@ -68,7 +68,7 @@ public class dWallRun : NetworkBehaviour public void WallRunRoutine() { - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } isWallRunning = false; diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayCam.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayCam.cs index fe3fe3e..bde5ff7 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayCam.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayCam.cs @@ -17,7 +17,7 @@ public class dPlayCam : NetworkBehaviour void Update () { - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } offset = transform.parent.forward * rad.magnitude; transform.position = new Vector3((player.transform.position.x - offset.x),((player.transform.position.y - offset.y)+2),(player.transform.position.z - offset.z)); diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs index 28920ab..250afb3 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs @@ -103,7 +103,7 @@ public class dPlayerMovement : NetworkBehaviour // Don't do movement unless this is the local player controlling it // Otherwise we let the server handle moving us - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } // Don't lock the cursor multiple times if this isn't the local player // Also don't want to lock the cursor for the king @@ -116,7 +116,7 @@ public class dPlayerMovement : NetworkBehaviour { // Don't do movement unless this is the local player controlling it // Otherwise we let the server handle moving us - if (!IsLocalPlayer) { return; } + //if (!IsLocalPlayer) { return; } //Controls for camera diff --git a/Assets/Scripts/SetInvScene/InvSceneSettings.cs b/Assets/Scripts/SetInvScene/InvSceneSettings.cs index 7dc6646..f69a8a8 100644 --- a/Assets/Scripts/SetInvScene/InvSceneSettings.cs +++ b/Assets/Scripts/SetInvScene/InvSceneSettings.cs @@ -19,12 +19,12 @@ public class InvSceneSettings : MonoBehaviour // Start is called before the first frame update void Awake(){ - pPar = GameObject.Find("PlayerPrefab"); + pPar = GameObject.Find("DebugPlayerPrefab"); player1 = pPar.transform.Find("PlayerModel").gameObject; pStats = player1.GetComponent(); pointText = GameObject.Find("PlayerPoints").GetComponentInChildren(); pInv = player1.GetComponent(); - player1.GetComponent().enabled = false; + player1.GetComponent().enabled = false; pPar.transform.Find("PlayerCam").gameObject.SetActive(false); invMan = GetComponent(); @@ -93,21 +93,21 @@ public class InvSceneSettings : MonoBehaviour //Enables Script on player //NEEDS TO BE CLEANED UP AND IMPROVED public void itemToEnable(){ - if(pStats.HasBlink != player1.GetComponent().enabled) - player1.GetComponent().enabled = pStats.HasBlink; - if(pStats.HasDash != player1.GetComponent().enabled) - player1.GetComponent().enabled = pStats.HasDash; - if(pStats.HasWallrun != player1.GetComponent().enabled) - player1.GetComponent().enabled = pStats.HasWallrun; - if(pStats.HasGrapple != player1.GetComponent().enabled) - player1.GetComponent().enabled = pStats.HasGrapple; + if(pStats.HasBlink != player1.GetComponent().enabled) + player1.GetComponent().enabled = pStats.HasBlink; + if(pStats.HasDash != player1.GetComponent().enabled) + player1.GetComponent().enabled = pStats.HasDash; + if(pStats.HasWallrun != player1.GetComponent().enabled) + player1.GetComponent().enabled = pStats.HasWallrun; + if(pStats.HasGrapple != player1.GetComponent().enabled) + player1.GetComponent().enabled = pStats.HasGrapple; if(pStats.HasNitro != player1.GetComponent().enabled) player1.GetComponent().enabled = pStats.HasNitro; } public void nextScene(){ - player1.GetComponent().enabled = true; + player1.GetComponent().enabled = true; player1.GetComponent().enabled = false; pPar.transform.GetChild(0).gameObject.SetActive(true); SceneManager.LoadScene (SceneManager.GetActiveScene().buildIndex + 1); diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index d0da7fd..72926fc 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,38 +6,8 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: - value: 22424703114646680e0b0227036c7b151b180b65082d2b3f6004083ff6e92434e3fe33fba92f31352d1b - flags: 0 - RecentlyUsedScenePath-1: - value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6cb353d3e204cfa320d2a18 - flags: 0 - RecentlyUsedScenePath-2: - value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6ca3b36327717e1351027 - flags: 0 - RecentlyUsedScenePath-3: - value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6ca3f31297717e1351027 - flags: 0 - RecentlyUsedScenePath-4: - value: 22424703114646680e0b0227036c6b19021b1d192f2d2835633c133af6f9 - flags: 0 - RecentlyUsedScenePath-5: value: 22424703114646680e0b0227036c7b151b180b6505263035233d1221fbd33134e7e422e0e8347129370bfb25 flags: 0 - RecentlyUsedScenePath-6: - value: 224247031146467c0c03096f3d2c4a1e02161124623d28393930 - flags: 0 - RecentlyUsedScenePath-7: - value: 22424703114646680e0b0227036c731f1415016439262f2434 - flags: 0 - RecentlyUsedScenePath-8: - value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb - flags: 0 - RecentlyUsedScenePath-9: - value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb - flags: 0 - UnityRemoteCompression: - value: 337f73 - flags: 0 vcSharedLogLevel: value: 0d5e400f0650 flags: 0