diff --git a/Assets/Prefabs/Player/DebugPlayerPrefab 1.prefab b/Assets/Prefabs/Player/DebugPlayerPrefab 1.prefab index dd3a314..e3565d5 100644 --- a/Assets/Prefabs/Player/DebugPlayerPrefab 1.prefab +++ b/Assets/Prefabs/Player/DebugPlayerPrefab 1.prefab @@ -3090,7 +3090,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5150911369967604842} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 3.73, z: -3.75} + m_LocalPosition: {x: 0, y: 3.73, z: -4.1} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 297879044457584256} @@ -3502,7 +3502,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6664667533527262100} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.022, y: 0.24, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 30, y: 30, z: 30} m_Children: - {fileID: 4750020548013614359} @@ -3691,7 +3691,7 @@ MonoBehaviour: isGrounded: 0 groundCheckDistance: 0.05 cam: {fileID: 2637749574256434612} - minAngle: -30 + minAngle: -18 maxAngle: 30 sensitivity: 200 isSliding: 0 diff --git a/Assets/Prefabs/Player/PlayerPrefab 2.prefab b/Assets/Prefabs/Player/PlayerPrefab 2.prefab index e896d8a..1df666c 100644 --- a/Assets/Prefabs/Player/PlayerPrefab 2.prefab +++ b/Assets/Prefabs/Player/PlayerPrefab 2.prefab @@ -218,7 +218,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 643107261017207491} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.022, y: 0.24, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 30, y: 30, z: 30} m_Children: - {fileID: 1547575739446424640} @@ -407,7 +407,7 @@ MonoBehaviour: isGrounded: 0 groundCheckDistance: 0.05 cam: {fileID: 8073346823032474851} - minAngle: -30 + minAngle: -18 maxAngle: 30 sensitivity: 200 isSliding: 0 @@ -784,7 +784,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1435196873050654013} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.088, y: 2.45, z: -3.76} + m_LocalPosition: {x: 0, y: 3.73, z: -4.1} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 5815033341186033623} @@ -5209,7 +5209,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 9132932128127309148} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 44.3, y: 6.52, z: -4} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 5729495139526590871} diff --git a/Assets/Scenes/Demos/MovementScene.unity b/Assets/Scenes/Demos/MovementScene.unity index 23eed21..684d38b 100644 --- a/Assets/Scenes/Demos/MovementScene.unity +++ b/Assets/Scenes/Demos/MovementScene.unity @@ -1596,10 +1596,18 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1950656855408660672, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} + propertyPath: m_LocalPosition.z + value: -4.11 + objectReference: {fileID: 0} - target: {fileID: 3039877022422189067, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} propertyPath: m_Name value: DebugPlayerPrefab 1 objectReference: {fileID: 0} + - target: {fileID: 6664667533527261801, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} + propertyPath: jumpPow + value: 60 + objectReference: {fileID: 0} - target: {fileID: 6664667533527261801, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} propertyPath: hasNitro value: 0 @@ -1608,6 +1616,14 @@ PrefabInstance: propertyPath: hasGlider value: 1 objectReference: {fileID: 0} + - target: {fileID: 6664667533527261801, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} + propertyPath: hasWallrun + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6664667533527261807, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} + propertyPath: minAngle + value: -18 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 6adb8bcc65ee3a54da64d7c65225f219, type: 3} --- !u!1 &1493944130 diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs index 43f45f4..45c26cd 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs @@ -25,10 +25,10 @@ public class dDash : NetworkBehaviour{ //UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING void FixedUpdate(){ - if(pMove.pStats.HasDash) Dash(); + if(pMove.pStats.HasDash) DashPlayer(); } - void Dash(){ + void DashPlayer(){ //if (!IsLocalPlayer) { return; } if(characterController.enabled == true){ if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false) diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs index 967fbfe..2e830da 100644 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs +++ b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs @@ -4,7 +4,7 @@ using MLAPI; using UnityEngine; -public class Dash : NetworkBehaviour { +public class Dash : NetworkBehaviour{ public Vector3 moveDirection; public const float maxDashTime = 1.0f; @@ -19,17 +19,34 @@ public class Dash : NetworkBehaviour { PlayerMovement pMove; void Start(){ - characterController = GetComponent(); + characterController = this.gameObject.GetComponent(); pMove = GetComponent(); } //UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING void FixedUpdate(){ + if(pMove.pStats.HasDash) DashPlayer(); + } + + void DashPlayer(){ if (!IsLocalPlayer) { return; } - if(pMove.pStats.HasDash){ - DashMovement(); + if(characterController.enabled == true){ + if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false) + { + currentDashTime = 0; + StartCoroutine(startCoolDown()); + } + if(currentDashTime < maxDashTime) + { + moveDirection = transform.forward * dashDistance; + currentDashTime += dashStoppingSpeed; + } + else + { + moveDirection = Vector3.zero; + } + characterController.Move(moveDirection * Time.deltaTime * dashSpeed); } - } private IEnumerator startCoolDown(){ @@ -41,23 +58,4 @@ public class Dash : NetworkBehaviour { Debug.Log("end corotine"); } - private void DashMovement(){ - if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false) - { - currentDashTime = 0; - StartCoroutine(startCoolDown()); - } - if(currentDashTime < maxDashTime) - { - moveDirection = transform.forward * dashDistance; - currentDashTime += dashStoppingSpeed; - } - else - { - moveDirection = Vector3.zero; - } - - //characterController.Move(moveDirection * Time.deltaTime * dashSpeed); - } - } \ No newline at end of file diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/Resources/ItemObjects/Springs.asset b/Assets/Scripts/PlayerScripts/PlayerItems/Resources/ItemObjects/Springs.asset index d6cdd8d..33d601a 100644 --- a/Assets/Scripts/PlayerScripts/PlayerItems/Resources/ItemObjects/Springs.asset +++ b/Assets/Scripts/PlayerScripts/PlayerItems/Resources/ItemObjects/Springs.asset @@ -19,7 +19,7 @@ MonoBehaviour: minVelM: 0 curVelM: 0 accM: 0 - jumpPowM: 30 + jumpPowM: 15 jumpNumM: 0 tractionM: 0 kickPowM: 0 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index f132bb4..3bb5dcd 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,14 +9,17 @@ EditorUserSettings: value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb flags: 0 RecentlyUsedScenePath-1: - value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26 - flags: 0 - RecentlyUsedScenePath-2: value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb flags: 0 - RecentlyUsedScenePath-3: + RecentlyUsedScenePath-2: value: 22424703114646680e0b0227036c731f1415016439262f2434 flags: 0 + RecentlyUsedScenePath-3: + value: 22424703114646680e0b0227036c7b151b180b650e3a233126281f3fe7c23837e1ec25a7f234362820 + flags: 0 + RecentlyUsedScenePath-4: + value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26 + flags: 0 vcSharedLogLevel: value: 0d5e400f0650 flags: 0