Skip to content
Snippets Groups Projects
Commit bde369c4 authored by averrous's avatar averrous
Browse files

fix: toast and reset test parameter

parent 71786f4b
1 merge request!19Averrous/feat/gameover
......@@ -51,7 +51,7 @@ public class EnemyManager : MonoBehaviour
{
count++;
// fill count with last quest
if (count == 1) isBoss = true;
if (count == 4) isBoss = true;
Debug.Log("Turn on " + nameof(this.Spawn));
InvokeRepeating(nameof(this.Spawn), spawnTime, spawnTime);
}
......
......@@ -26,7 +26,6 @@ public class SettingManager : MonoBehaviour
Debug.Log("VOLUME: " + GlobalManager.Instance.Volume);
if (Input.GetKeyDown(KeyCode.Escape))
{
Debug.Log("CLOSINGGGGGGGGG");
Close();
}
}
......
......@@ -42,6 +42,11 @@ class ToastManager : MonoBehaviour
public void ShowToast(string text,
int duration)
{
StartCoroutine(showToastCOR(text, duration));
}
public void ShowToastQueue(string text, int duration)
{
//StartCoroutine(showToastCOR(text, duration));
toasts.Enqueue((text, duration));
......
......@@ -83,17 +83,17 @@ public class Temple : MonoBehaviour
}
idxCurrentQuest++;
ToastManager.Instance.ShowToast("Quest " + idxCurrentQuest + " is Completed!", 1);
ToastManager.Instance.ShowToastQueue("Quest " + idxCurrentQuest + " is Completed!", 1);
// retrieve the time
// add it to the global time
// remove the timer
var questTime = timer.TakeTime();
ToastManager.Instance.ShowToast("Your total time now: "
ToastManager.Instance.ShowToastQueue("Your total time now: "
+ System.TimeSpan.FromSeconds(GlobalManager.Instance.TotalTime).ToString("mm':'ss")
+ " + " + System.TimeSpan.FromSeconds(questTime).ToString("mm':'ss"), 1);
GlobalManager.Instance.TotalTime += questTime;
ToastManager.Instance.ShowToast(System.TimeSpan.FromSeconds(GlobalManager.Instance.TotalTime).ToString("mm':'ss"), 1);
ToastManager.Instance.ShowToastQueue(System.TimeSpan.FromSeconds(GlobalManager.Instance.TotalTime).ToString("mm':'ss"), 1);
}
private void OnTriggerEnter(Collider other)
......
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