浏览代码

Refactoring Dialogue System

/main
uChema 3 年前
当前提交
9936dca6
共有 14 个文件被更改,包括 901 次插入1596 次删除
  1. 20
      UOP1_Project/Assets/Cutscenes/BeachCandyCutscene.playable
  2. 998
      UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue Shared Data.asset
  3. 971
      UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_en.asset
  4. 314
      UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_fr.asset
  5. 26
      UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_it.asset
  6. 24
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Ayud.asset
  7. 11
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Bard-Town.asset
  8. 21
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Bard.asset
  9. 24
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Cerise.asset
  10. 24
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Felfel.asset
  11. 23
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-LegChef.asset
  12. 22
      UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Terra.asset
  13. 15
      UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
  14. 4
      UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs

20
UOP1_Project/Assets/Cutscenes/BeachCandyCutscene.playable


m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011569
m_KeyId: 58354979076694069
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011574
m_KeyId: 58354979076694074
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011573
m_KeyId: 58354979076694073
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011571
m_KeyId: 58354979076694071
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011570
m_KeyId: 58354979076694070
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011576
m_KeyId: 58354979076694076
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011575
m_KeyId: 58354979076694075
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011572
m_KeyId: 58354979076694072
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011567
m_KeyId: 58354979076694067
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 57158352748011568
m_KeyId: 58354979076694068
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

998
UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue Shared Data.asset
文件差异内容过多而无法显示
查看文件

971
UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_en.asset
文件差异内容过多而无法显示
查看文件

314
UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_fr.asset


m_Metadata:
m_Items: []
m_TableData:
- m_Id: 238002416508928
m_Localized: Bonjour
m_Metadata:
m_Items: []
- m_Id: 9306103809
m_Localized: Bienvenue au village !
m_Metadata:
m_Items: []
- m_Id: 20323438161682432
m_Localized: "Parfait ! On se voit l\xE0-bas"
m_Metadata:
m_Items: []
- m_Id: 20323667103571968
m_Localized: Ok ! Allez-y quand vous voulez !
m_Metadata:
m_Items: []
- m_Id: 47073068710748160
m_Localized: That lover her sweets as much as her spicy
m_Metadata:
m_Items: []
- m_Id: 9306103808
m_Localized: Salut!
m_Metadata:
m_Items: []
- m_Id: 238002471034880
m_Localized: "Bienvenue \xE0 la plage"
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
- m_Id: 55883239830446136
m_Localized: No problem, come back when you have it.
m_Metadata:
m_Items: []
- m_Id: 47060280844083200
m_Localized: 'Hey there, let met tell you about the competition ! '
m_Metadata:
m_Items: []
- m_Id: 47064574574059520
m_Localized: 'Did you find the egg? '
m_Metadata:
m_Items: []
- m_Id: 47064756166451200
m_Localized: 'Awesome ! it''s perfect ! '
m_Metadata:
m_Items: []
- m_Id: 47064761195421696
m_Localized: No problem, come back when you have it. I'll tell you more about
my secret recipe
m_Metadata:
m_Items: []
- m_Id: 47071503866257408
m_Localized: 'Hello again Chef! Are you here for the competition ? '
m_Metadata:
m_Items: []
- m_Id: 47071766836535296
m_Localized: 'Perfect ! I know you''re going to win ! '
m_Metadata:
m_Items: []
- m_Id: 47071771064393728
m_Localized: 'Why not? It''s an awesome experience ! Here let me do it for you. '
m_Metadata:
m_Items: []
- m_Id: 47073457984102400
m_Localized: There once was a lady named Saly
m_Metadata:
m_Items: []
- m_Id: 47073689857810432
m_Localized: 'She lived in the forest and never wanted to leave it. '
m_Metadata:
m_Items: []
- m_Id: 47074112706568192
m_Localized: Lucky are those who have met her.
m_Metadata:
m_Items: []
- m_Id: 47074164204232704
m_Localized: Many tried, few suceeded
m_Metadata:
m_Items: []
- m_Id: 47078874327932928
m_Localized: Hi I'm Jim
m_Metadata:
m_Items: []
- m_Id: 47079733954732032
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 47079858139684864
m_Localized: Do you like sweets?
m_Metadata:
m_Items: []
- m_Id: 47080344121106432
m_Localized: Do you have any sweets ?
m_Metadata:
m_Items: []
- m_Id: 47080768521756672
m_Localized: 'Oh wow this is so good ! '
m_Metadata:
m_Items: []
- m_Id: 47081577766576128
m_Localized: Do you know that there's a sweet golden egg somewhere in the mountain?
m_Metadata:
m_Items: []
- m_Id: 47080900608778240
m_Localized: I would've loved to discover a new recipe
m_Metadata:
m_Items: []
- m_Id: 47081127671619584
m_Localized: 'You said you were looking for pepper? I have some ! '
m_Metadata:
m_Items: []
- m_Id: 47082187345747968
m_Localized: You are welcome
m_Metadata:
m_Items: []
- m_Id: 47082777647898624
m_Localized: 'Did you find the pepper? '
m_Metadata:
m_Items: []
- m_Id: 47082943717171200
m_Localized: Thank you ! You are the best !
m_Metadata:
m_Items: []
- m_Id: 47082946690932736
m_Localized: Ok! Come back when you find it
m_Metadata:
m_Items: []
- m_Id: 47083409075200000
m_Localized: Blank
m_Metadata:
m_Items: []
- m_Id: 47083386933469184
m_Localized: Here's my recipe for spicy sauce
m_Metadata:
m_Items: []
- m_Id: 50280554632699904
m_Localized: That's amaizing ! you win the competition
m_Metadata:
m_Items: []
- m_Id: 56134394363895869
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011521
m_Localized: Welcome to town!
m_Metadata:
m_Items: []
- m_Id: 57158352748011522
m_Localized: Now head to the town centre, where the legendary chef is waiting
for you.
m_Metadata:
m_Items: []
- m_Id: 57158352748011536
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011538
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011554
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011555
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011563
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011564
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011565
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011566
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011577
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011590
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011591
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011595
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011596
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011606
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011607
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011610
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011611
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011615
m_Localized: 'Talk about town '
m_Metadata:
m_Items: []
- m_Id: 57158352748011619
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011620
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011621
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011622
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011623
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011624
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011625
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011627
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011628
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011647
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011649
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011650
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011668
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011669
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011672
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011674
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011675
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011678
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011682
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011685
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011689
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011695
m_Localized:
m_Metadata:
m_Items: []
- m_Id: 57158352748011696
m_Localized:
m_Metadata:
m_Items: []
references:

26
UOP1_Project/Assets/LocalizationFiles/AssetTables/QuestSystem/Questline Dialogue_it.asset


m_SharedData: {fileID: 11400000, guid: f81a49615d56c1a4fbbd14b4569b06f3, type: 2}
m_Metadata:
m_Items: []
m_TableData:
- m_Id: 238002416508928
m_Localized: Ciao
m_Metadata:
m_Items: []
- m_Id: 9306103809
m_Localized: "Benvenuto in citt\xE1!"
m_Metadata:
m_Items: []
- m_Id: 20323438161682432
m_Localized: "Perfetto! Ci vediamo l\xED!"
m_Metadata:
m_Items: []
- m_Id: 20323667103571968
m_Localized: Ok, vai quando vuoi!
m_Metadata:
m_Items: []
- m_Id: 9306103808
m_Localized: Hey!
m_Metadata:
m_Items: []
- m_Id: 238002471034880
m_Localized: Ben arrivato alla spiaggia
m_Metadata:
m_Items: []
m_TableData: []
references:
version: 1

24
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Ayud.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-Ayud
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 5e7bd0eed8324794fad1bc460c565ecb, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 9306103809
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 0
_choices: []
_dialogueType: 0
_lines:
- _actorID: 3
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Ayud
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

11
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Bard-Town.asset


m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Bard
m_FallbackState: 0
m_WaitForCompletion: 1
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L2-D1-Default-Bard
m_Key: L1-D1-Default-Bard-Town
_dialogueType: 0
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

21
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Bard.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-Bard
m_EditorClassIdentifier:
_lines: []
_dialogueType: 0
_lines:
- _actorID: 0
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Bard
m_FallbackState: 0
m_WaitForCompletion: 1
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L2-D1-Default-Bard
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

24
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Cerise.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-Cerise
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: f69d689cc127a104ba12b6a06cad8bf8, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 51041002986528768
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 0
_choices: []
_dialogueType: 0
_lines:
- _actorID: 6
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Cerise
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

24
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Felfel.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-Felfel
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 57f499d332bed904d82f12c003ecc859, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: GUID:f81a49615d56c1a4fbbd14b4569b06f3
m_TableEntryReference:
m_KeyId: 51040990005157888
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 0
_choices: []
_dialogueType: 0
_lines:
- _actorID: 2
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Felfel
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

23
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-LegChef.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-LegChef
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: 2f14ee79b2fa2574480372fff57ec101, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-Default-FryKing
m_FallbackState: 0
_choices: []
_dialogueType: 0
_lines:
- _actorID: 5
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-LegChef
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

22
UOP1_Project/Assets/ScriptableObjects/Dialogue/Default/Default-Terra.asset


m_Script: {fileID: 11500000, guid: a0c0171b565b4074a9462307824be26c, type: 3}
m_Name: Default-Terra
m_EditorClassIdentifier:
_actor: {fileID: 11400000, guid: b8d80efffb7881e4ebeb39806d2c6d18, type: 2}
_dialogueLines:
- m_TableReference:
m_TableCollectionName: GUID:3023456eb4be043f1a0c6ede7f88d892
m_TableEntryReference:
m_KeyId: 9306103808
m_Key:
_choices: []
_dialogueType: 0
_lines:
- _actorID: 4
_textList:
- m_TableReference:
m_TableCollectionName: Questline Dialogue
m_TableEntryReference:
m_KeyId: 0
m_Key: L1-D1-Default-Terra
m_FallbackState: 0
m_WaitForCompletion: 1
_choices: []
_dialogueType: 3
_endOfDialogueEvent: {fileID: 0}

15
UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs


public DialogueDataSO()
{
}
public DialogueDataSO(string dialogueName)
{
SetDialogueLines(dialogueName);
}
public DialogueDataSO(DialogueDataSO dialogue)
{

{
SetDialogueLines(this.name);
}
public DialogueDataSO(string dialogueName)
{
SetDialogueLines(dialogueName);
}
void SetDialogueLines(string dialogueName)
{
if (_lines == null)

{
[SerializeField] private ActorID _actorID = default;
[SerializeField] private List<LocalizedString> _textList = default;
[SerializeField] private List<Choice> _choices = default;
[SerializeField] private List<Choice> _choices = null;
public ActorID Actor => _actorID;
public List<LocalizedString> TextList => _textList;

{
_actorID = (ActorID)Enum.Parse(typeof(ActorID), comment.CommentText);
}
#if UNITY_EDITOR
public Line(string _name)
{
StringTableCollection collection = LocalizationEditorSettings.GetStringTableCollection("Questline Dialogue");

}
}
#endif
}

4
UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs


if (_currentDialogue._Lines != null)
{
ActorSO currentActor = _actorsList.Find(o => o.ActorId == _currentDialogue._Lines[_counterDialogue].Actor); // we don't add a controle, because we need a null reference exeption if the actor is not in the list
DisplayDialogueLine(_currentDialogue._Lines[_counterDialogue].TextList[_counterLine], currentActor);
}

_counterLine++;
if (!_reachedEndOfLine)
{
else if (_currentDialogue._Lines[_counterDialogue].Choices != null)
else if (_currentDialogue._Lines[_counterDialogue].Choices != null && _currentDialogue._Lines[_counterDialogue].Choices.Count > 0)
{
if (_currentDialogue._Lines[_counterDialogue].Choices.Count > 0)
{

正在加载...
取消
保存