Skip to content
Snippets Groups Projects
Commit 79f035a2 authored by Addin Munawwar's avatar Addin Munawwar
Browse files

fix: cutscene sync

parent 40674238
No related merge requests found
...@@ -65,6 +65,8 @@ public class DialogueManager : MonoBehaviour ...@@ -65,6 +65,8 @@ public class DialogueManager : MonoBehaviour
private void SkipOrNextDialogue() private void SkipOrNextDialogue()
{ {
if (!TimelineManager.Instance.allowContinue) return;
if (isTyping) if (isTyping)
{ {
StopAllCoroutines(); StopAllCoroutines();
......
...@@ -28,6 +28,7 @@ public class InGameTimelineManager : TimelineManager ...@@ -28,6 +28,7 @@ public class InGameTimelineManager : TimelineManager
protected override void OnStartTimelineMark() protected override void OnStartTimelineMark()
{ {
Instance.allowContinue = false;
switch (currentMarkIndex) switch (currentMarkIndex)
{ {
case 1: case 1:
...@@ -62,7 +63,6 @@ public class InGameTimelineManager : TimelineManager ...@@ -62,7 +63,6 @@ public class InGameTimelineManager : TimelineManager
throwerAnim.SetBool("Idle", true); throwerAnim.SetBool("Idle", true);
break; break;
case 8: case 8:
Instance.allowContinue = false;
unityChan_3.gameObject.SetActive(false); unityChan_3.gameObject.SetActive(false);
SwitchToGameplay(); SwitchToGameplay();
...@@ -79,7 +79,6 @@ public class InGameTimelineManager : TimelineManager ...@@ -79,7 +79,6 @@ public class InGameTimelineManager : TimelineManager
throwerAnim.SetBool("Idle", false); throwerAnim.SetBool("Idle", false);
QuestManager.Instance.StartSpawning(); QuestManager.Instance.StartSpawning();
Instance.allowContinue = true;
break; break;
case 9: case 9:
SwitchToCutscene(); SwitchToCutscene();
...@@ -97,6 +96,7 @@ public class InGameTimelineManager : TimelineManager ...@@ -97,6 +96,7 @@ public class InGameTimelineManager : TimelineManager
default: default:
break; break;
} }
Instance.allowContinue = true;
} }
private void SwitchToCutscene() { private void SwitchToCutscene() {
......
...@@ -94,6 +94,10 @@ public class QuestManager : MonoBehaviour ...@@ -94,6 +94,10 @@ public class QuestManager : MonoBehaviour
TimelineManager.Instance.NextTimeline(); TimelineManager.Instance.NextTimeline();
OrbsSpawner.Instance.spawnFlag = true; OrbsSpawner.Instance.spawnFlag = true;
}, onQuestCompleted: () => { }, onQuestCompleted: () => {
foreach (var item in GameObject.FindGameObjectsWithTag("Enemy"))
{
Destroy(item);
}
TimelineManager.Instance.NextTimeline(); TimelineManager.Instance.NextTimeline();
AudioManager.Instance.PlayBGMCrossfade("Night"); AudioManager.Instance.PlayBGMCrossfade("Night");
OrbsSpawner.Instance.spawnFlag = false; OrbsSpawner.Instance.spawnFlag = false;
...@@ -109,10 +113,10 @@ public class QuestManager : MonoBehaviour ...@@ -109,10 +113,10 @@ public class QuestManager : MonoBehaviour
{ {
new SpawnerData new SpawnerData
{ {
SpawnArea = new SpawnArea { Origin = spawnTransform, Radius = 50}, SpawnArea = new SpawnArea { Origin = spawnTransform, Radius = 36},
Mob = General, Mob = General,
MobCount = 3, MobCount = 4,
SpawnInterval = 5f SpawnInterval = 2f
}, },
} }
}, onQuestStarted: () => { }, onQuestStarted: () => {
......
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