Fix World Camera
This commit is contained in:
@@ -16,11 +16,6 @@ namespace Scampz.GameJam
|
||||
private Animator _animator;
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _dialogueTextGUI;
|
||||
[SerializeField]
|
||||
private float _defaultTextSpeed = 0.1f;
|
||||
|
||||
private float _currentTextSpeed;
|
||||
|
||||
|
||||
private Queue<string> sentences;
|
||||
|
||||
@@ -48,8 +43,6 @@ namespace Scampz.GameJam
|
||||
{
|
||||
if (IsTalking && Input.GetButtonDown(InputOptions.Cancel))
|
||||
EndDialogue();
|
||||
|
||||
_currentTextSpeed = _defaultTextSpeed;
|
||||
}
|
||||
|
||||
public void StartDialogue(Dialogue dialogue)
|
||||
@@ -93,10 +86,12 @@ namespace Scampz.GameJam
|
||||
{
|
||||
_dialogueTextGUI.text += letter;
|
||||
yield return null;
|
||||
yield return new WaitForSeconds(_currentTextSpeed);
|
||||
yield return new WaitForSeconds(dialogue.TextSpeed);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return null;
|
||||
SFXManager.Instance.StopSoundEffect();
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
yield return new WaitForKeyDown(InputOptions.Submit);
|
||||
SFXManager.Instance.PlaySoundEffect(SoundEffectName.Ok);
|
||||
DisplayNextSentence(dialogue);
|
||||
@@ -104,6 +99,7 @@ namespace Scampz.GameJam
|
||||
|
||||
private void EndDialogue()
|
||||
{
|
||||
StopAllCoroutines();
|
||||
_animator.SetBool("IsOpen", false);
|
||||
_dialogueTextGUI.text = string.Empty;
|
||||
IsTalking = false;
|
||||
|
||||
Reference in New Issue
Block a user