Amel Negra
4 年前
当前提交
4ac06b52
共有 18 个文件被更改,包括 312 次插入 和 67 次删除
-
10UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
-
37UOP1_Project/Assets/Scripts/Quests/Editor/DialogueLine.uxml
-
112UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs
-
4UOP1_Project/Assets/Scripts/Quests/Editor/StepDetail.uxml
-
12UOP1_Project/Assets/Scripts/Quests/Resources/QuestEditorWindow.uss
-
6UOP1_Project/Assets/Scripts/Quests/Resources/QuestEditorWindow.uxml
-
35UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/StepSO.cs
-
4.DS_Store
-
59UOP1_Project/Assets/DialogueUSS.uss
-
11UOP1_Project/Assets/DialogueUSS.uss.meta
-
8UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/Quest3/Step3.meta
-
8UOP1_Project/Assets/ScriptableObjects/Quests/Questline3.meta
-
1UOP1_Project/Assets/Scripts/Quests/.DS_Store
-
36UOP1_Project/Assets/Scripts/Quests/Editor/DialoguePreview.cs
-
11UOP1_Project/Assets/Scripts/Quests/Editor/DialoguePreview.cs.meta
-
17UOP1_Project/Assets/ScriptableObjects/Quests/Questline3/QL3.asset
-
8UOP1_Project/Assets/ScriptableObjects/Quests/Questline3/QL3.asset.meta
|
|||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> |
|||
<ui:VisualElement name="line-box" style="flex-direction: column; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;"> |
|||
<ui:VisualElement name="lines" style="flex-direction: row; width: 100%;"> |
|||
<ui:VisualElement name="left-line" style="margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; width: 50%; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;"> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="left-line-label" style="background-color: rgb(158, 222, 115); white-space: normal; color: rgba(73, 94, 0, 255);" /> |
|||
</ui:VisualElement> |
|||
<ui:VisualElement name="right-line" style="width: 50%; margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px;"> |
|||
<ui:Label text="This is line 2." display-tooltip-when-elided="true" name="right-line-label" style="background-color: rgb(243, 145, 137); white-space: normal; color: rgb(106, 9, 0);" /> |
|||
<Style src="/Assets/DialogueUSS.uss" /> |
|||
<ui:VisualElement name="DialogueWithBranches"> |
|||
<ui:VisualElement name="Dialogue" style="align-items: stretch; min-width: 50%;"> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="Line" class="DefaultLine" /> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="Line" class="DefaultLine" /> |
|||
<ui:VisualElement name="Choices" class="Choices"> |
|||
<ui:VisualElement name="Dialogue" class="Choice"> |
|||
<ui:Button text="Yes" name="Button" class="ChoiceButton" /> |
|||
<ui:VisualElement name="Default" style="align-items: stretch; min-width: 50%;"> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="winDialogue" class="CompletionLine" /> |
|||
<ui:VisualElement name="Choices" class="Choices"> |
|||
<ui:VisualElement name="Choice" class="Choice"> |
|||
<ui:Button text="Yes" name="Button" class="ChoiceButton" /> |
|||
<ui:VisualElement name="Dialogue" style="align-items: stretch; min-width: 50%;"> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="Line" class="CompletionLine" /> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
<ui:VisualElement name="Choice" style="align-items: stretch; min-width: 50%;"> |
|||
<ui:Button text="Yes" name="Button" class="ChoiceButton" /> |
|||
<ui:VisualElement name="Dialogue" style="align-items: stretch; min-width: 50%;"> |
|||
<ui:Label text="This is line 1." display-tooltip-when-elided="true" name="Line" class="IncompletionLine" /> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
<ui:VisualElement name="buttons" style="flex-direction: row; justify-content: space-around;"> |
|||
<ui:Button text="Yes" name="btn-0" style="width: 45%; background-color: rgb(115, 115, 115);" /> |
|||
<ui:Button text="No" name="btn-1" style="width: 45%; background-color: rgb(115, 115, 115);" /> |
|||
</ui:VisualElement> |
|||
</ui:VisualElement> |
|||
</ui:UXML> |
4
.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
Label#winDialogue { |
|||
margin-left: 5px; |
|||
margin-right: 5px; |
|||
margin-top: 5px; |
|||
margin-bottom: 5px; |
|||
background-color: rgb(158, 222, 115); |
|||
white-space: normal; |
|||
color: rgb(73, 94, 0); |
|||
} |
|||
|
|||
Label#loseDialogue { |
|||
margin-left: 5px; |
|||
margin-right: 5px; |
|||
margin-top: 5px; |
|||
margin-bottom: 5px; |
|||
background-color: rgb(222, 115, 143); |
|||
white-space: normal; |
|||
color: rgb(89, 0, 9); |
|||
} |
|||
|
|||
#Choices Button { |
|||
background-color: rgb(115, 115, 115); |
|||
} |
|||
|
|||
Label#defaultDialogue { |
|||
margin-left: 5px; |
|||
margin-right: 5px; |
|||
margin-top: 5px; |
|||
margin-bottom: 5px; |
|||
background-color: rgb(209, 209, 209); |
|||
white-space: normal; |
|||
color: rgb(101, 101, 101); |
|||
} |
|||
|
|||
Label#startDialogue { |
|||
margin-left: 5px; |
|||
margin-right: 5px; |
|||
margin-top: 5px; |
|||
margin-bottom: 5px; |
|||
background-color: rgb(209, 209, 209); |
|||
white-space: normal; |
|||
color: rgb(101, 101, 101); |
|||
} |
|||
|
|||
#Dialogue { |
|||
align-items: stretch; |
|||
min-width: 50%; |
|||
} |
|||
|
|||
#Choices { |
|||
align-items: stretch; |
|||
flex-direction: row; |
|||
justify-content: center; |
|||
} |
|||
|
|||
#Choice { |
|||
align-items: stretch; |
|||
min-width: 50%; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 33f1afe432a6d49bf91bda9df012a949 |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} |
|||
disableValidation: 0 |
|
|||
fileFormatVersion: 2 |
|||
guid: 7705ad9018dc044ae915f6d9a1a8c3e5 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: cc0d7169fb8564bec9db9943e8075cb4 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1
UOP1_Project/Assets/Scripts/Quests/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.UIElements; |
|||
|
|||
public class DialoguePreview : MonoBehaviour |
|||
{ |
|||
private VisualElement CreateDialoguePreviewWithBranching(DialogueDataSO dialogueDataSO) |
|||
{ |
|||
VisualElement dialoguePreviewVE = new VisualElement(); |
|||
|
|||
DialogueDataSO currentDialogue = dialogueDataSO; |
|||
|
|||
foreach (LocalizedString localizedString in currentDialogue.DialogueLines) |
|||
{ |
|||
Label dialogueLine = new Label(); |
|||
dialogueLine.text = localizedString.GetLocalizedStringImmediateSafe(); |
|||
dialoguePreviewVE.Add(dialogueLine); |
|||
} |
|||
if (currentDialogue.Choices != null) |
|||
{ |
|||
foreach (Choice choice in currentDialogue.Choices) |
|||
{ |
|||
Button dialogueButton = new Button(); |
|||
dialogueButton.text = choice.Response.GetLocalizedStringImmediateSafe(); |
|||
dialoguePreviewVE.Add(dialogueButton); |
|||
dialoguePreviewVE.Add(CreateDialoguePreviewWithBranching(choice.NextDialogue)); |
|||
} |
|||
} |
|||
|
|||
|
|||
return dialoguePreviewVE; |
|||
} |
|||
|
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 293d889c6c87c4f579c4dbc768dffba0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 05c700bba7d21604586cb89ec5afdee0, type: 3} |
|||
m_Name: QL3 |
|||
m_EditorClassIdentifier: |
|||
_idQuestLine: 3 |
|||
_quests: [] |
|||
_isDone: 0 |
|
|||
fileFormatVersion: 2 |
|||
guid: b04857eeebf9c4cc28e25c95399ed0b4 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue