weather and pause functionality implemented

This commit is contained in:
Melbyj1125
2022-03-02 12:56:22 -06:00
parent 00c3495461
commit 741dae95cd
6 changed files with 22 additions and 28 deletions

View File

@@ -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))){

View File

@@ -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);
}
}
////