mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 01:44:30 -05:00
weather and pause functionality implemented
This commit is contained in:
@@ -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))){
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user