Commit 1a29b10d authored by Ashley's avatar Ashley

made the pause menu

parent d984067e
This diff is collapsed.
......@@ -12,10 +12,12 @@ public class GameManager : SingletonBehaviour<GameManager>
private float _levelTimer;
public Text timerText;
private GameObject birb;
private GameObject pauseMenu;
void Awake()
{
birb = GameObject.Find("Player");
GameObject pauseMenu = gameObject.GetComponent<PauseMenu>().gameObject;
DontDestroyOnLoad(this);
//isPaused = true;
}
......@@ -32,12 +34,14 @@ public class GameManager : SingletonBehaviour<GameManager>
{
//set timescale back to normal
Time.timeScale = 1;
pauseMenu.SetActive(false);
Debug.Log("Game is unpaused");
}
else
{
//set timescale to zero
Time.timeScale = 0;
pauseMenu.SetActive(true);
Debug.Log("Game is paused");
}
_isPaused = value;
......
m_EditorVersion: 5.5.0f3
m_EditorVersion: 5.5.1f1

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Birb", "Assembly-CSharp.csproj", "{A490B848-188F-485C-9203-EFF824787523}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2015
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "birb.CSharp", "birb.CSharp.csproj", "{40340304-79A9-6623-4DE1-B2CE709C92DF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -9,15 +9,12 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A490B848-188F-485C-9203-EFF824787523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A490B848-188F-485C-9203-EFF824787523}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A490B848-188F-485C-9203-EFF824787523}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A490B848-188F-485C-9203-EFF824787523}.Release|Any CPU.Build.0 = Release|Any CPU
{40340304-79A9-6623-4DE1-B2CE709C92DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40340304-79A9-6623-4DE1-B2CE709C92DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40340304-79A9-6623-4DE1-B2CE709C92DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40340304-79A9-6623-4DE1-B2CE709C92DF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
EndGlobalSection
EndGlobal
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