Commit 53f13639 authored by Ashley's avatar Ashley

pause menu works

parent 2352a6cb
......@@ -5648,12 +5648,7 @@ Prefab:
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1960887437048796, guid: 4b32869774338904a875250168c72931, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 114824675588022588, guid: 4b32869774338904a875250168c72931, type: 2}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 4b32869774338904a875250168c72931, type: 2}
m_IsPrefabParent: 0
--- !u!224 &1776203236 stripped
......
......@@ -31,6 +31,7 @@ public class GameManager : SingletonBehaviour<GameManager>
if (isPaused)
{
//set timescale back to normal
Time.timeScale = 1;
pauseMenu.SetActive(false);
Debug.Log("Game is unpaused");
}
......@@ -80,6 +81,19 @@ public class GameManager : SingletonBehaviour<GameManager>
{
string currentTime = formatTime(Time.time - levelTimer);
timerText.text = "Time: " + currentTime;
if(Input.GetButtonDown("Cancel"))
{
if(pauseMenu.active == true)
{
isPaused = false;
pauseMenu.active = false;
}
else
{
isPaused = true;
pauseMenu.active = true;
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment