diff --git a/Assets/Prefabs/Player/DebugSMPlayerPrefab.prefab b/Assets/Prefabs/Player/DebugSMPlayerPrefab.prefab index aa59e2c..f84e96d 100644 --- a/Assets/Prefabs/Player/DebugSMPlayerPrefab.prefab +++ b/Assets/Prefabs/Player/DebugSMPlayerPrefab.prefab @@ -928,7 +928,7 @@ GameObject: - component: {fileID: 1707207228499037412} - component: {fileID: 1707207228499037411} - component: {fileID: 1707207228499037410} - m_Layer: 0 + m_Layer: 3 m_Name: T-Pose m_TagString: ArcherTarget m_Icon: {fileID: 0} @@ -984,14 +984,16 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: addc2e37ff81c1b4989ec34b6150b4f7, type: 3} m_Name: m_EditorClassIdentifier: - maxVel: 45 + maxVel: 50 minVel: 18 curVel: 0 hardCapMaxVel: 90 acc: 0.02 + curAcc: 0 jumpPow: 60 jumpNum: 2 traction: 5 + curTraction: 0 kickPow: 300 recovTime: 3 playerGrav: 200 @@ -1002,6 +1004,9 @@ MonoBehaviour: hasNitro: 0 hasDash: 0 playerPoints: 15 + isPaused: 0 + windOn: 0 + windDirection: {x: 0, y: 0, z: 0} --- !u!114 &1707207228499037471 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2253,7 +2258,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &3454051987037357494 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Demos/MovementScene.unity b/Assets/Scenes/Demos/MovementScene.unity index d7180a6..44b8de4 100644 --- a/Assets/Scenes/Demos/MovementScene.unity +++ b/Assets/Scenes/Demos/MovementScene.unity @@ -3106,18 +3106,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 1707207228499037409, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} - propertyPath: m_Layer - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 1707207228499037465, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3454051987037357495, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - target: {fileID: 5759777694531189237, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} propertyPath: m_RootOrder value: 10 @@ -3166,9 +3154,5 @@ PrefabInstance: propertyPath: m_Name value: DebugSMPlayerPrefab objectReference: {fileID: 0} - - target: {fileID: 7053551988629990270, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} diff --git a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/DebugSlide/dMoveSlideState.cs b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/DebugSlide/dMoveSlideState.cs index 2b06912..9bc9519 100644 --- a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/DebugSlide/dMoveSlideState.cs +++ b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/DebugSlide/dMoveSlideState.cs @@ -42,7 +42,7 @@ public class dMoveSlideState : dMoveBaseState } //steadily increase traction - mSM.pStats.Traction += .004f; + mSM.pStats.CurTraction += .004f; //If player isn't pressing either Q or the joystick button they stop sliding if nothing is above them if((!Input.GetKey(KeyCode.JoystickButton1) && !Input.GetKey(KeyCode.Q))){ diff --git a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/dMoveStateManager.cs b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/dMoveStateManager.cs index 88c6ee4..dccd453 100644 --- a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/dMoveStateManager.cs +++ b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugMoveState/dMoveStateManager.cs @@ -116,8 +116,10 @@ public class dMoveStateManager : NetworkBehaviour //if (!IsLocalPlayer) { return; } Cursor.lockState = CursorLockMode.Locked; // Lock cursor on start if you are the local player - pStats.Traction = pStats.CurTraction; + pStats.CurTraction = pStats.Traction; pStats.CurAcc = pStats.Acc; + + pStats.SetWeather(PlayerStats.Weather.Wind, new Vector3(1,0,0)); } // Update is called once per frame @@ -309,7 +311,7 @@ public class dMoveStateManager : NetworkBehaviour //Apply Wind movement to the player public void ApplyWind(bool wind){ if(wind){ - moveController.Move(pStats.WindDirection.normalized * 2); + moveController.Move(pStats.WindDirection.normalized * .2f); } } //// diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/Slide/MoveSlideState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/Slide/MoveSlideState.cs index 2f4f89d..9c7d1a5 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/Slide/MoveSlideState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/Slide/MoveSlideState.cs @@ -42,7 +42,7 @@ public class MoveSlideState : MoveBaseState } //steadily increase traction - mSM.pStats.Traction += .004f; + mSM.pStats.CurTraction += .004f; //If player isn't pressing either Q or the joystick button they stop sliding if nothing is above them if((!Input.GetKey(KeyCode.JoystickButton1) && !Input.GetKey(KeyCode.Q))){ diff --git a/Assets/Scripts/PlayerScripts/PlayerStats.cs b/Assets/Scripts/PlayerScripts/PlayerStats.cs index e360cf9..a991c10 100644 --- a/Assets/Scripts/PlayerScripts/PlayerStats.cs +++ b/Assets/Scripts/PlayerScripts/PlayerStats.cs @@ -173,7 +173,8 @@ public class PlayerStats : MonoBehaviour private float accModification; //sets weather effect on player - public void SetWeather(Weather weather, Vector3 windDir){ + public void SetWeather(Weather weather, Vector3 windDir = default(Vector3)){ + switch(weather){ case Weather.Rain:{ Debug.Log("Rain"); @@ -181,9 +182,9 @@ public class PlayerStats : MonoBehaviour tempTraction = traction; tempAcc = acc; - traction -= 2; - if(curTraction - 2 > 0){ - curTraction -= 2; + traction -= 4; + if(curTraction - 4 > 0){ + curTraction -= 4; } acc += 2; @@ -208,6 +209,8 @@ public class PlayerStats : MonoBehaviour curAcc *= .5f; accModification = -acc; + curVel *= .5f; + break; } @@ -257,7 +260,7 @@ public class PlayerStats : MonoBehaviour Debug.Assert((maxVel >= 0), "maxVel cannot be below zero"); Debug.Assert((minVel >= 0), "minVel cannot be below zero"); Debug.Assert((curVel >= 0), "curVel cannot be below zero"); - Debug.Assert((jumpPow >= 0), "jumpPow cannot be below zero"); + Debug.Assert((jumpPow >= 0), "jumpPow cannot be below zero"); Debug.Assert((jumpNum >= 2), "jumpNum cannot be below 2"); Debug.Assert((traction >= 0), "traction cannot be below zero"); Debug.Assert((kickPow >= 0), "Playerpoints cannot be below zero");