Remove pause menu was already done

This commit is contained in:
Soulaha Balde 2022-05-15 11:06:52 -04:00
parent e6fa39fb67
commit dea51e54f2
5 changed files with 2 additions and 3394 deletions

File diff suppressed because it is too large Load Diff

View File

@ -184,19 +184,7 @@ MonoBehaviour:
m_ActionId: 61ddf11f-3478-4887-ab86-0ead8dde336f
m_ActionName: UI/TrackedDeviceOrientation
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: EnterPause
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_Calls: []
m_ActionId: 1e10adeb-97dd-4b7c-9f30-b3fce70f993a
m_ActionName: Player/Pause[/Keyboard/escape,/Keyboard/p]
m_NeverAutoSwitchControlSchemes: 0

View File

@ -5,7 +5,6 @@ public class GameManager : MonoBehaviour
{
[SerializeField] private PlayerInput _controls;
[SerializeField, ReadOnly] private GameState _state;
[SerializeField] private UIController ui;
public static GameManager Instance { get; private set; }
@ -37,23 +36,10 @@ public class GameManager : MonoBehaviour
_state = GameState.Loss;
}
public void EnterPause(){
_controls.SwitchCurrentActionMap("UI");
_state = GameState.Pause;
ui.EnterPause();
}
public void ExitPause(){
_controls.SwitchCurrentActionMap("Player");
_state = GameState.InGame;
ui.ExitPause();
}
}
public enum GameState
{
MainMenu,
InGame,
Loss,
Pause
}

View File

@ -11,7 +11,7 @@ public class PlayerController : MonoBehaviour
// Start is called before the first frame update
void Start()
{
//fireRateUpgrade = new FireRateUpgrade("Fire rate 1", 10, 0.4f);
}
// Update is called once per frame

View File

@ -7,13 +7,9 @@ public class UIController : MonoBehaviour
{
[SerializeField]private PlayerController player;
[SerializeField]private TMP_Text pointsTxt;
[SerializeField]private Transform pausePnl;
[SerializeField]private Transform optionsPnl;
// Start is called before the first frame update
void Start()
{
pausePnl.gameObject.SetActive(false);
optionsPnl.gameObject.SetActive(false);
}
// Update is called once per frame
@ -21,26 +17,4 @@ public class UIController : MonoBehaviour
{
pointsTxt.text = player.GetPoints().ToString();
}
public void EnterPause(){
pausePnl.gameObject.SetActive(true);
}
public void ExitPause(){
pausePnl.gameObject.SetActive(false);
}
public void OnOptions(){
ExitPause();
optionsPnl.gameObject.SetActive(true);
}
public void OnBack(){
optionsPnl.gameObject.SetActive(false);
EnterPause();
}
public void OnQuit(){
Application.Quit();
}
}