43 lines
No EOL
947 B
C#
43 lines
No EOL
947 B
C#
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
[System.Serializable]
|
|
public class Choice
|
|
{
|
|
public string choiceText;
|
|
public DATA_Dialogue nextDialogue;
|
|
public string eventID;
|
|
public UnityEvent onChoiceSelected;
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class Sentence
|
|
{
|
|
public UnityEvent onSentenceStart;
|
|
|
|
[TextArea(3, 10)] public string text;
|
|
public float speed = 0.05f;
|
|
|
|
[Header("Visuals")]
|
|
public Sprite characterSprite;
|
|
|
|
[Header("Audio Settings")]
|
|
public AudioClip voiceClip;
|
|
public float minPitch = 0.98f;
|
|
public float maxPitch = 1.02f;
|
|
|
|
[Header("Settings")]
|
|
public bool isSkipable = true;
|
|
public string eventID;
|
|
|
|
[Header("Choices")]
|
|
public Choice[] choices;
|
|
|
|
public UnityEvent onSentenceComplete;
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "NewDialogue", menuName = "Dialogue System/Dialogue")]
|
|
public class DATA_Dialogue : ScriptableObject
|
|
{
|
|
public Sentence[] sentences;
|
|
} |