Skip to content
Snippets Groups Projects
Commit ddc7ee28 authored by Saul Sayers's avatar Saul Sayers
Browse files

chore: stop totaltime inc saat jeda

parent a9f2a2e9
No related merge requests found
...@@ -34,8 +34,9 @@ public class EnemyHealth : MonoBehaviour ...@@ -34,8 +34,9 @@ public class EnemyHealth : MonoBehaviour
{ {
transform.Translate (-Vector3.up * sinkSpeed * Time.deltaTime); transform.Translate (-Vector3.up * sinkSpeed * Time.deltaTime);
} }
if (JedaManager.isJeda){ if (JedaManager.isJeda && !isDead){
Death(); Death();
Destroy (gameObject, 2f);
} }
} }
......
...@@ -105,7 +105,7 @@ public class QuestManager : MonoBehaviour ...@@ -105,7 +105,7 @@ public class QuestManager : MonoBehaviour
{ {
string filePath = Application.dataPath + "/SaveFile/Leaderboard.json"; string filePath = Application.dataPath + "/SaveFile/Leaderboard.json";
List<List<object>> LeaderboardDataList = new List<List<object>>(); List<List<object>> LeaderboardDataList = new List<List<object>>();
LeaderboardDataList.Add(new List<object>() {GameManager.username, ScoreManager.score, NewDateTime.CreateNewDateTime(DateTime.Now).ToString() }); LeaderboardDataList.Add(new List<object>() {GameManager.username, (int)Math.Round(TimeManager.totalTime, 0) , NewDateTime.CreateNewDateTime(DateTime.Now).ToString() });
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {
......
...@@ -16,7 +16,7 @@ public class TimeManager : MonoBehaviour ...@@ -16,7 +16,7 @@ public class TimeManager : MonoBehaviour
void Update() void Update()
{ {
if (!GameManager.isPause){ if (!GameManager.isPause && !JedaManager.isJeda){
TimeManager.totalTime += Time.deltaTime; TimeManager.totalTime += Time.deltaTime;
} }
if (text.text != ((int)Math.Round(totalTime, 0)).ToString()){ if (text.text != ((int)Math.Round(totalTime, 0)).ToString()){
......
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