Commit 49e9c0b7 authored by Shellby Grehawick's avatar Shellby Grehawick

Merge branch 'gameManager' into 'master'

Game manager

See merge request !7
parents f7c174b8 238c3b61
fileFormatVersion: 2
guid: 2057902e730664aacbc88367b9c3b892
guid: d31ebdd80916bea45bd33409fe585333
folderAsset: yes
timeCreated: 1486687237
timeCreated: 1486686817
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:
\ No newline at end of file
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : SingletonBehaviour<GameManager>
{
private bool _isPaused;
//Manages game state. Pause, death, win, and changing levels.
public bool isPaused
{
get
{
return _isPaused;
}
set
{
_isPaused = value;
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 Fail()
{
Debug.Log("You have died");
}
public void Win()
{
Debug.Log("You won!");
}
public void ChangeLevel()
{
Debug.Log("Changing level state");
}
}
fileFormatVersion: 2
guid: cad3061263b98c140a9a3a49d70204c9
timeCreated: 1486686808
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
m_EditorVersion: 5.5.1f1
m_EditorVersion: 5.5.1f1
\ No newline at end of file
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