Commit e9702593 authored by Ashley's avatar Ashley

added methods to GameManager

parent d0929e21
......@@ -4,14 +4,40 @@ using UnityEngine;
public class GameManager : SingletonBehaviour<GameManager>
{
private bool isPaused;
//Manages game state. Pause, death, win, and changing levels.
public void Pause()
{
if(isPaused)
{
//set timescale back to normal
isPaused = false;
Debug.Log("Game is unpaused");
}
else
{
//set timescale to zero
isPaused = true;
Debug.Log("Game is paused");
}
}
public void Death()
{
Debug.Log("You have died");
}
public void Win()
{
Debug.Log("You won!");
}
public void changeLevel()
{
Debug.Log("Changing level state");
}
public bool getPause()
{
return isPaused;
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
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