forked from cgvr/DeltaVR
add some voicelines to archery range minigame
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -13,7 +14,7 @@ public class NPCController : MonoBehaviour
|
||||
public float mouthScalingMultiplier = 2.5f;
|
||||
public float mouthMovementDuration = 0.25f;
|
||||
|
||||
public string voicelineKey;
|
||||
public string[] voiceLineKeys;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
@@ -47,9 +48,11 @@ public class NPCController : MonoBehaviour
|
||||
if (controller != null)
|
||||
{
|
||||
playerTransform = controller.transform;
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||
} else if (playerOrigin != null)
|
||||
{
|
||||
playerTransform = playerOrigin.transform;
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +70,11 @@ public class NPCController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SpeakVoiceLine(int voiceLineId)
|
||||
{
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[voiceLineId], gameObject);
|
||||
}
|
||||
|
||||
public void StartTalking()
|
||||
{
|
||||
isTalking = true;
|
||||
|
||||
Reference in New Issue
Block a user