pause disables inputs instead of scripts

This commit is contained in:
Melbyj1125
2022-03-01 19:53:23 -06:00
parent 0ef78f3eb5
commit 00c3495461
28 changed files with 104 additions and 94 deletions

View File

@@ -172,7 +172,7 @@ public class dMoveStateManager : NetworkBehaviour
//Player Speed Calculator
public float PlayerSpeed(){
//If nothing is pressed speed is 0
if ((Input.GetAxis("Vertical") == 0.0f && Input.GetAxis("Horizontal") == 0.0f))
if ((Input.GetAxis("Vertical") == 0.0f && Input.GetAxis("Horizontal") == 0.0f) || pStats.IsPaused)
{
pStats.CurVel = 0.0f;
return pStats.CurVel;
@@ -261,7 +261,7 @@ public class dMoveStateManager : NetworkBehaviour
//Camera and player rotation
private void Rotation(){
//If moveController is enabled allow Camera control
if(moveController.enabled){
if(moveController.enabled && !pStats.IsPaused){
//if input is received from Mouse X
if (Input.GetAxis("Mouse X") != 0){
transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("Mouse X"));