Commit 4266bfb2 authored by astatham's avatar astatham
Browse files

Merge commit '7029adbb' into piethrowing

# Conflicts:
#	RingMaster/RingMaster/.vs/RingMaster/xs/UserPrefs.xml
parents 13a9a441 7029adbb
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/PieScripts/Pie.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/LevelManager.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="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/PieScripts/Pie.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/DaytimeManager.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/LevelManager.cs" Line="22" Column="9" />
</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() {
......
......@@ -2,19 +2,30 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class LevelManager : MonoBehaviour {
public Text score;
public Text combo;
private float exitTime;
// Use this for initialization
void Start () {
exitTime = Mathf.Infinity;
}
private void FixedUpdate() {
score.text = "Score: " + (int)MimeMime.PlayerScore;
combo.text = "Combo: " + MimeMime.Combo;
if(Time.time > exitTime){
SceneManager.LoadScene("Daytime");
}
}
public void SongFinished(){
//maybe meke it fade out
exitTime = Time.time + 5;
}
}
......@@ -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() {
......
......@@ -18,24 +18,16 @@ public class SpawnKeys : MonoBehaviour {
Queue<string[]> songKeys = new Queue<string[]>();
string[] nextKey;
string[] arrows;
float[] timings;
int pointer = 0;
float songWaitTime;
private LevelManager levelManager;
// Use this for initialization
void Start () {
levelManager = GetComponent<LevelManager>();
startTime = Time.time;
//loads data into two side-by-side arrays one holding
//the string value of the arrowkey and the other
//holding the float value of the timestamp that
//the key should be instantiated.
print("Array version");
string[] lines = songFile.text.Split('\n');
arrows = new string[lines.Length-1];
timings = new float[lines.Length-1];
int count = 0;
......@@ -136,6 +128,9 @@ public class SpawnKeys : MonoBehaviour {
}
else
{
if(!endSong){
levelManager.SongFinished();
}
//no more keys
nextKey = null;
endSong = 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