Commit b3b15082 authored by radow's avatar radow

patch 1.2

parent b659a4a1
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
fileFormatVersion: 2
guid: e04b6ead82d70c1448ac179fa7267573
guid: 849aea79e928e0547a90996bc5faa76c
PluginImporter:
externalObjects: {}
serializedVersion: 2
......
......@@ -9,6 +9,8 @@ public class POITrigger : MonoBehaviour {
public AudioClip[] VAToHEar;
Collider coll;
POIRotator effect;
public static int counter = 0;
static float eraseafter = 0;
private void Awake() {
coll = GetComponent<Collider>();
......@@ -23,7 +25,17 @@ public class POITrigger : MonoBehaviour {
foreach (var obj in toDeactivate) {
obj.SetActive(false);
}
coll.enabled = false;
if (effect) effect.enabled = false;
coll.enabled = false;
counter++;
TextDisplay.instance.counter.text = counter + "/11";
eraseafter = Time.time + 3;
Invoke("Erase", 4);
}
void Erase()
{
if(Time.time > eraseafter && InputMode.IsMovement())TextDisplay.instance.counter.text = "";
}
}
......@@ -50,6 +50,7 @@ public class MainMenuManager : MonoBehaviour
{
IngameMenuCanvas.SetActive(true);
InputMode.SetModeUI();
TextDisplay.instance.counter.text = POITrigger.counter + "/11";
}
else if (!mainmenu) Continue();
}
......@@ -88,6 +89,7 @@ public class MainMenuManager : MonoBehaviour
{
InputMode.SetModeMovement();
IngameMenuCanvas.SetActive(false);
TextDisplay.instance.counter.text = "";
}
public void Quit()
......@@ -97,6 +99,7 @@ public class MainMenuManager : MonoBehaviour
public void Restart()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
POITrigger.counter = 0;
}
}
......@@ -6,6 +6,7 @@ using System.Linq;
public class TextDisplay : MonoBehaviour {
public static TextDisplay instance;
public TextMeshProUGUI counter;
TextMeshProUGUI text;
GameObject panel;
GameObject skip;
......
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
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