Commit 72bf9a12 authored by mmaluschnig's avatar mmaluschnig
Browse files

made the pause menu a prefab that can be put in any minigame

parent 80010280
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/SimonScripts/Note.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/DaytimeScripts/DaytimeManager.cs">
<Files>
<File FileName="Assets/TextFiles/TestMultiples.txt" Line="1" Column="1" />
<File FileName="Assets/Scripts/SpawnKeys.cs" Line="98" Column="33" />
<File FileName="Assets/Scripts/Key.cs" Line="17" Column="41" />
<File FileName="Assets/Scripts/Key.cs" Line="17" Column="18" />
<File FileName="Assets/Scripts/TriggerManager.cs" Line="1" Column="1" />
<File FileName="Assets/TextFiles/Bavaria.txt" Line="5" Column="9" />
<File FileName="Assets/Scripts/SimonScripts/SimonScript.cs" Line="58" Column="34" />
<File FileName="Assets/Scripts/SimonScripts/NoteManager.cs" Line="31" Column="10" />
<File FileName="Assets/Scripts/SimonScripts/SimonGameManager.cs" Line="20" Column="57" />
<File FileName="Assets/Scripts/SimonScripts/Note.cs" Line="8" Column="33" />
<File FileName="Assets/Scripts/MenuScripts/PauseMenu.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/DaytimeManager.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
fileFormatVersion: 2
guid: a6dd0ddad611645efbc5ef92c67041a7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -1912,6 +1912,53 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1001 &1695219293
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 224962148856270744, guid: a6dd0ddad611645efbc5ef92c67041a7,
type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalPosition.x
value: 1.0530677
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalPosition.y
value: 1.222854
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalPosition.z
value: -5.073231
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4682724213509072, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_RootOrder
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &1746446291
GameObject:
m_ObjectHideFlags: 0
......
......@@ -16,7 +16,7 @@ public class DaytimeManager : MonoBehaviour {
}
void Update() {
pauseMenuManagemnent();
//pauseMenuManagemnent();
}
private void pauseMenuManagemnent() {
......
......@@ -5,14 +5,51 @@ using UnityEngine.SceneManagement;
public class PauseMenu : MonoBehaviour {
private DaytimeManager dayManager;
//private DaytimeManager dayManager;
public GameObject pauseMenu;
private bool pauseMenuActive = false;
void Awake() {
dayManager = GameObject.FindWithTag("Manager").GetComponent<DaytimeManager>();
//dayManager = GameObject.FindWithTag("Manager").GetComponent<DaytimeManager>();
setPauseMenu(false);
}
void Update()
{
if (!pauseMenuActive)
{
if (Input.GetKeyDown(KeyCode.Escape))
{
setPauseMenu(true);
}
}
else
{
if (Input.GetKeyDown(KeyCode.Escape))
{
setPauseMenu(false);
}
}
}
public void setPauseMenu(bool active)
{
pauseMenu.SetActive(active);
pauseMenuActive = active;
if (active)
{
Time.timeScale = 0;
}
else
{
Time.timeScale = 1;
}
}
public void Continue() {
dayManager.setPauseMenu(false);
setPauseMenu(false);
}
public void ExitGame() {
......
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