Add SFX to dialogue, revamp control scheme (broken world map camera)

This commit is contained in:
2022-08-17 22:12:53 -07:00
parent 294b113598
commit bc8092d454
29 changed files with 1413 additions and 485 deletions

View File

@@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Scampz.GameJam.Assets.Scripts;
using Scampz.GameJam.Assets.Scripts.Audio;
using Scampz.GameJam.Assets.Scripts.Utilities;
using TMPro;
using UnityEngine;
@@ -64,6 +65,8 @@ namespace Scampz.GameJam
return;
}
SFXManager.Instance.PlaySoundEffect(SoundEffect.Narration);
var sentence = sentences.Dequeue();
StopAllCoroutines();
StartCoroutine(TypeSentence(sentence));
@@ -80,7 +83,11 @@ namespace Scampz.GameJam
yield return new WaitForSecondsRealtime(_textSpeed);
}
yield return new WaitForSecondsRealtime(1f);
SFXManager.Instance.StopSoundEffect();
yield return new WaitForKeyDown(InputOptions.Submit);
SFXManager.Instance.PlaySoundEffect(SoundEffect.Ok);
yield return new WaitForSeconds(0.5f);
DisplayNextSentence();
}
@@ -88,6 +95,7 @@ namespace Scampz.GameJam
{
_animator.SetBool("IsOpen", false);
IsTalking = false;
SFXManager.Instance.StopSoundEffect();
}
}
}