uChema
4 年前
当前提交
2aa92a2d
共有 45 个文件被更改,包括 2615 次插入 和 0 次删除
-
1UOP1_Project/Assets/AddressableAssetsData/AddressableAssetSettings.asset
-
14UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-AssetTables.asset
-
71UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset
-
129UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-StringTables.asset
-
70UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
-
108UOP1_Project/Assets/Dialogue Test Shared Data.asset
-
8UOP1_Project/Assets/Dialogue Test Shared Data.asset.meta
-
103UOP1_Project/Assets/Dialogue Test .asset
-
8UOP1_Project/Assets/Dialogue Test .asset.meta
-
102UOP1_Project/Assets/Dialogue Test _en.asset
-
8UOP1_Project/Assets/Dialogue Test _en.asset.meta
-
102UOP1_Project/Assets/Dialogue Test _fr.asset
-
8UOP1_Project/Assets/Dialogue Test _fr.asset.meta
-
43UOP1_Project/Assets/Localization Files/Asset Tables/Font Shared Data.asset
-
8UOP1_Project/Assets/Localization Files/Asset Tables/Font Shared Data.asset.meta
-
22UOP1_Project/Assets/Localization Files/Asset Tables/Font.asset
-
8UOP1_Project/Assets/Localization Files/Asset Tables/Font.asset.meta
-
26UOP1_Project/Assets/Localization Files/Asset Tables/Font_en.asset
-
8UOP1_Project/Assets/Localization Files/Asset Tables/Font_en.asset.meta
-
26UOP1_Project/Assets/Localization Files/Asset Tables/Font_fr.asset
-
8UOP1_Project/Assets/Localization Files/Asset Tables/Font_fr.asset.meta
-
8UOP1_Project/Assets/Samples.meta
-
1001UOP1_Project/Assets/Scenes/TestingGround.unity
-
8UOP1_Project/Assets/Samples/Localization.meta
-
8UOP1_Project/Assets/Samples/Localization/0.9.0-preview.meta
-
8UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings.meta
-
5UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/.sample.json
-
82UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LoadingMultipleStringsExample.cs
-
11UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LoadingMultipleStringsExample.cs.meta
-
30UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringGetLocalizedStringExample.cs
-
11UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringGetLocalizedStringExample.cs.meta
-
60UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringTableExample.cs
-
11UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringTableExample.cs.meta
-
39UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringWithChangeHandlerExample.cs
-
11UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/LocalizedStringWithChangeHandlerExample.cs.meta
-
65UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/StringDatabaseGetLocalizedStringExample.cs
-
11UOP1_Project/Assets/Samples/Localization/0.9.0-preview/Loading Strings/StringDatabaseGetLocalizedStringExample.cs.meta
-
312UOP1_Project/Assets/Scripts/Quests/QuestAncorSO.cs
-
53UOP1_Project/Assets/Scripts/Quests/ScriptableObjects/StepSO.cs
|
|||
%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: 5b11a58205ec3474ca216360e9fa74a8, type: 3} |
|||
m_Name: Dialogue Test Shared Data |
|||
m_EditorClassIdentifier: |
|||
m_TableCollectionName: 'Dialogue Test ' |
|||
m_TableCollectionNameGuidString: fa861d4d052e86c4182bff8b7cbbe4e2 |
|||
m_Entries: |
|||
- m_Id: 238002416508928 |
|||
m_Key: SD-L1-S1-Q1-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034880 |
|||
m_Key: SD-L2-S1-Q1-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034881 |
|||
m_Key: SD-L1-S2-Q1-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034882 |
|||
m_Key: SD-L1-S1-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034883 |
|||
m_Key: SD-L2-S1-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034884 |
|||
m_Key: SD-L1-S2-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034885 |
|||
m_Key: SD-L1-S3-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229184 |
|||
m_Key: SD-L1-S1-Q3-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229185 |
|||
m_Key: SD-L1-S2-Q3-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229186 |
|||
m_Key: SD-L1-S1-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229187 |
|||
m_Key: SD-L1-S2-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229188 |
|||
m_Key: SD-L1-S3-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229189 |
|||
m_Key: CD-L1-S2-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229190 |
|||
m_Key: ID-L1-S2-Q2-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229191 |
|||
m_Key: CD-L1-S2-Q3-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229192 |
|||
m_Key: ID-L1-S2-Q3-QL1 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229193 |
|||
m_Key: CD-L1-S2-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229194 |
|||
m_Key: ID-L1-S2-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229195 |
|||
m_Key: CD-L1-S3-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229196 |
|||
m_Key: ID-L1-S3-Q1-QL2 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_KeyGenerator: |
|||
id: 0 |
|||
references: |
|||
version: 1 |
|||
00000000: |
|||
type: {class: DistributedUIDGenerator, ns: UnityEngine.Localization.Tables, |
|||
asm: Unity.Localization} |
|||
data: |
|||
m_CustomEpoch: 1611657466880 |
|
|||
fileFormatVersion: 2 |
|||
guid: fa861d4d052e86c4182bff8b7cbbe4e2 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: 5be51871efa6c3e4eae1703925c8f5ac, type: 3} |
|||
m_Name: 'Dialogue Test ' |
|||
m_EditorClassIdentifier: |
|||
m_SharedTableData: {fileID: 11400000, guid: fa861d4d052e86c4182bff8b7cbbe4e2, type: 2} |
|||
m_Tables: |
|||
- {fileID: 11400000, guid: 79571eb7079cad446bd934159ccaf7b1, type: 2} |
|||
- {fileID: 11400000, guid: 5f70dc3e7ec41734fa501915805982e2, type: 2} |
|||
m_Extensions: |
|||
- id: 0 |
|||
- id: 1 |
|||
- id: 2 |
|||
m_Group: String Table |
|||
references: |
|||
version: 1 |
|||
00000000: |
|||
type: {class: GoogleSheetsExtension, ns: UnityEditor.Localization.Plugins.Google, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Collection: {fileID: 11400000} |
|||
m_SheetsServiceProvider: {fileID: 11400000, guid: 048784966300e0f418f4fb2c6af7efb3, |
|||
type: 2} |
|||
m_SpreadsheetId: 1luF1JYM54a-2ijKBRV8cuqDki0C7qENoCGYJurP2YcY |
|||
m_SheetId: 1626946536 |
|||
m_Columns: |
|||
- id: 3 |
|||
- id: 4 |
|||
m_RemoveMissingPulledKeys: 0 |
|||
00000001: |
|||
type: {class: GoogleSheetsExtension, ns: UnityEditor.Localization.Plugins.Google, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Collection: {fileID: 11400000} |
|||
m_SheetsServiceProvider: {fileID: 11400000, guid: 048784966300e0f418f4fb2c6af7efb3, |
|||
type: 2} |
|||
m_SpreadsheetId: 1luF1JYM54a-2ijKBRV8cuqDki0C7qENoCGYJurP2YcY |
|||
m_SheetId: 1626946536 |
|||
m_Columns: |
|||
- id: 5 |
|||
- id: 6 |
|||
m_RemoveMissingPulledKeys: 0 |
|||
00000002: |
|||
type: {class: GoogleSheetsExtension, ns: UnityEditor.Localization.Plugins.Google, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Collection: {fileID: 11400000} |
|||
m_SheetsServiceProvider: {fileID: 11400000, guid: 048784966300e0f418f4fb2c6af7efb3, |
|||
type: 2} |
|||
m_SpreadsheetId: 1luF1JYM54a-2ijKBRV8cuqDki0C7qENoCGYJurP2YcY |
|||
m_SheetId: 1626946536 |
|||
m_Columns: |
|||
- id: 7 |
|||
- id: 8 |
|||
m_RemoveMissingPulledKeys: 1 |
|||
00000003: |
|||
type: {class: KeyColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: A |
|||
00000004: |
|||
type: {class: LocaleColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: B |
|||
m_LocaleIdentifier: |
|||
m_Code: en |
|||
m_IncludeComments: 0 |
|||
00000005: |
|||
type: {class: KeyColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: A |
|||
00000006: |
|||
type: {class: LocaleColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: C |
|||
m_LocaleIdentifier: |
|||
m_Code: fr |
|||
m_IncludeComments: 0 |
|||
00000007: |
|||
type: {class: KeyColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: A |
|||
00000008: |
|||
type: {class: LocaleColumn, ns: UnityEditor.Localization.Plugins.Google.Columns, |
|||
asm: Unity.Localization.Editor} |
|||
data: |
|||
m_Column: D |
|||
m_LocaleIdentifier: |
|||
m_Code: |
|||
m_IncludeComments: 0 |
|
|||
fileFormatVersion: 2 |
|||
guid: 26c4e2c8019ac074b957c74bc18cf52e |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} |
|||
m_Name: Dialogue Test _en |
|||
m_EditorClassIdentifier: |
|||
m_LocaleId: |
|||
m_Code: en |
|||
m_SharedData: {fileID: 11400000, guid: fa861d4d052e86c4182bff8b7cbbe4e2, type: 2} |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_TableData: |
|||
- m_Id: 238002416508928 |
|||
m_Localized: Hello |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034880 |
|||
m_Localized: Welcome to the beach |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034881 |
|||
m_Localized: Here's a knife for you! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034882 |
|||
m_Localized: Hello there |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034883 |
|||
m_Localized: 'Can you look for some tomatoes please? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034884 |
|||
m_Localized: Did you find the tomatoes? |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034885 |
|||
m_Localized: 'Here''s a Tomato soup recipe for you ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229184 |
|||
m_Localized: Hello, My name is Earl |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229185 |
|||
m_Localized: 'Do you want a mixer? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229186 |
|||
m_Localized: Hello Welcome to town |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229187 |
|||
m_Localized: 'Do you know how to cook a tomato soup ? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229188 |
|||
m_Localized: 'Do you have the tomato soup ? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229189 |
|||
m_Localized: Perfect! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229190 |
|||
m_Localized: No problem, come back when you find some ! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229191 |
|||
m_Localized: Here you go |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229192 |
|||
m_Localized: Okey come back when you want it |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229193 |
|||
m_Localized: Can you bring me some? |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229194 |
|||
m_Localized: Okey come back when you know how to do it. |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229195 |
|||
m_Localized: Awesome ! It tastes so good ! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229196 |
|||
m_Localized: No problem, come back when you have it. |
|||
m_Metadata: |
|||
m_Items: [] |
|||
references: |
|||
version: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 79571eb7079cad446bd934159ccaf7b1 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} |
|||
m_Name: Dialogue Test _fr |
|||
m_EditorClassIdentifier: |
|||
m_LocaleId: |
|||
m_Code: fr |
|||
m_SharedData: {fileID: 11400000, guid: fa861d4d052e86c4182bff8b7cbbe4e2, type: 2} |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_TableData: |
|||
- m_Id: 238002416508928 |
|||
m_Localized: Bonjour |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034880 |
|||
m_Localized: "Bienvenue \xE0 la plage" |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034881 |
|||
m_Localized: Voici un couteau pour vous |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034882 |
|||
m_Localized: Bonjour toi ! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034883 |
|||
m_Localized: Est ce que tu peux me trouver quelques tomates? |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034884 |
|||
m_Localized: "As tu trouv\xE9 les tomates?" |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002471034885 |
|||
m_Localized: Voici une recette pour de la soupe de tomates |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229184 |
|||
m_Localized: Salut, Moi c'est Earl |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229185 |
|||
m_Localized: 'Est ce que tu as un mixeur? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229186 |
|||
m_Localized: Bienvenue au village |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229187 |
|||
m_Localized: "Est ce que tu sais pr\xE9parer de la soupe de tomate" |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229188 |
|||
m_Localized: Est ce que tu as la soupe de tomate? |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229189 |
|||
m_Localized: Parfait ! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229190 |
|||
m_Localized: "Pas de probl\xE8me revenez quand vous en aurez ! " |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229191 |
|||
m_Localized: Voila pour vous! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229192 |
|||
m_Localized: Ok, revenez quand vous voudrez en avoir |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229193 |
|||
m_Localized: 'Est ce que tu peux m''en ramener? ' |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229194 |
|||
m_Localized: D'accord, revenez quand vous saurez! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229195 |
|||
m_Localized: Parfait! C'est trop bon! |
|||
m_Metadata: |
|||
m_Items: [] |
|||
- m_Id: 238002475229196 |
|||
m_Localized: "Pas de probl\xE8me revenez quand vous en aurez ! " |
|||
m_Metadata: |
|||
m_Items: [] |
|||
references: |
|||
version: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 5f70dc3e7ec41734fa501915805982e2 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: 5b11a58205ec3474ca216360e9fa74a8, type: 3} |
|||
m_Name: Font Shared Data |
|||
m_EditorClassIdentifier: |
|||
m_TableCollectionName: Font |
|||
m_TableCollectionNameGuidString: 6a8afeec30be61d4bb23618ac27c2736 |
|||
m_Entries: |
|||
- m_Id: 7520247808 |
|||
m_Key: Font |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_Metadata: |
|||
m_Items: |
|||
- id: 0 |
|||
m_KeyGenerator: |
|||
id: 1 |
|||
references: |
|||
version: 1 |
|||
00000000: |
|||
type: {class: AssetTypeMetadata, ns: UnityEngine.Localization.Metadata, asm: Unity.Localization} |
|||
data: |
|||
m_Entries: |
|||
- m_KeyId: 7520247808 |
|||
m_TableCodes: |
|||
- en |
|||
- fr |
|||
m_TypeString: UnityEngine.Font, UnityEngine.TextRenderingModule, Version=0.0.0.0, |
|||
Culture=neutral, PublicKeyToken=null |
|||
00000001: |
|||
type: {class: DistributedUIDGenerator, ns: UnityEngine.Localization.Tables, |
|||
asm: Unity.Localization} |
|||
data: |
|||
m_CustomEpoch: 1611670537164 |
|
|||
fileFormatVersion: 2 |
|||
guid: 6a8afeec30be61d4bb23618ac27c2736 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: 4db626ad063b13545924a9839ac5fa83, type: 3} |
|||
m_Name: Font |
|||
m_EditorClassIdentifier: |
|||
m_SharedTableData: {fileID: 11400000, guid: 6a8afeec30be61d4bb23618ac27c2736, type: 2} |
|||
m_Tables: |
|||
- {fileID: 11400000, guid: a62ba054b698fc24090a707e8e9048e8, type: 2} |
|||
- {fileID: 11400000, guid: 3d877e937ae7de543af7762f2d26c871, type: 2} |
|||
m_Extensions: [] |
|||
m_Group: Asset Table |
|||
references: |
|||
version: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 4a7b303049746814fbdd5ea8fcb242c8 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: 97269afb30aa84742ae3f3342603618a, type: 3} |
|||
m_Name: Font_en |
|||
m_EditorClassIdentifier: |
|||
m_LocaleId: |
|||
m_Code: en |
|||
m_SharedData: {fileID: 11400000, guid: 6a8afeec30be61d4bb23618ac27c2736, type: 2} |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_TableData: |
|||
- m_Id: 7520247808 |
|||
m_Localized: e3265ab4bf004d28a9537516768c1c75 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
references: |
|||
version: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: a62ba054b698fc24090a707e8e9048e8 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 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: 97269afb30aa84742ae3f3342603618a, type: 3} |
|||
m_Name: Font_fr |
|||
m_EditorClassIdentifier: |
|||
m_LocaleId: |
|||
m_Code: fr |
|||
m_SharedData: {fileID: 11400000, guid: 6a8afeec30be61d4bb23618ac27c2736, type: 2} |
|||
m_Metadata: |
|||
m_Items: [] |
|||
m_TableData: |
|||
- m_Id: 7520247808 |
|||
m_Localized: e3265ab4bf004d28a9537516768c1c75 |
|||
m_Metadata: |
|||
m_Items: [] |
|||
references: |
|||
version: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 3d877e937ae7de543af7762f2d26c871 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3a69d685627722244924a5d565f0e34f |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
UOP1_Project/Assets/Scenes/TestingGround.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 3a0ffe2c62aecbf40b759a45bfc73991 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: dc939dfef0b373946ba98f3d963cada9 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 0bdd9cfc436714c4984e234306db1245 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
{ |
|||
"displayName": "Loading Strings", |
|||
"description": "This sample shows multiple ways to fetch localized strings from the Localization system.", |
|||
"createSeparatePackage": false |
|||
} |
|
|||
using System.Collections; |
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.Localization.Settings; |
|||
using UnityEngine.Localization.Tables; |
|||
using UnityEngine.ResourceManagement.AsyncOperations; |
|||
|
|||
namespace UnityEditor.Localization.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This example shows how a <see cref="StringTable"/> can be used directly in order to get translated strings for multiple entries.
|
|||
/// <seealso cref="LocalizedStringTableExample"/>
|
|||
/// </summary>
|
|||
public class LoadingMultipleStringsExample : MonoBehaviour |
|||
{ |
|||
// A LocalizedStringReference provides a simple interface to retrieving translated strings and their tables.
|
|||
public string stringTableCollectionName = "My Strings"; |
|||
|
|||
// We will cache our translated strings
|
|||
string m_TranslatedStringHello; |
|||
string m_TranslatedStringGoodbye; |
|||
string m_TranslatedStringThisIsATest; |
|||
|
|||
void OnEnable() |
|||
{ |
|||
// During initialization we start a request for the string and subscribe to any locale change events so that we can update the strings in the future.
|
|||
StartCoroutine(LoadStrings()); |
|||
LocalizationSettings.SelectedLocaleChanged += OnSelectedLocaleChanged; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
LocalizationSettings.SelectedLocaleChanged -= OnSelectedLocaleChanged; |
|||
} |
|||
|
|||
void OnSelectedLocaleChanged(Locale obj) |
|||
{ |
|||
StartCoroutine(LoadStrings()); |
|||
} |
|||
|
|||
IEnumerator LoadStrings() |
|||
{ |
|||
// A string table may not be immediately available such as during initialization of the localization system or when a table has not been loaded yet.
|
|||
var loadingOperation = LocalizationSettings.StringDatabase.GetTableAsync(stringTableCollectionName); |
|||
yield return loadingOperation; |
|||
|
|||
if (loadingOperation.Status == AsyncOperationStatus.Succeeded) |
|||
{ |
|||
var stringTable = loadingOperation.Result; |
|||
m_TranslatedStringThisIsATest = GetLocalizedString(stringTable, "This is a test"); |
|||
m_TranslatedStringHello = GetLocalizedString(stringTable, "Hello"); |
|||
m_TranslatedStringGoodbye = GetLocalizedString(stringTable, "Goodbye"); |
|||
} |
|||
else |
|||
{ |
|||
Debug.LogError("Could not load String Table\n" + loadingOperation.OperationException.ToString()); |
|||
} |
|||
} |
|||
|
|||
string GetLocalizedString(StringTable table, string entryName) |
|||
{ |
|||
// Get the table entry. The entry contains the localized string and Metadata
|
|||
var entry = table.GetEntry(entryName); |
|||
return entry.GetLocalizedString(); // We can pass in optional arguments for Smart Format or String.Format here
|
|||
} |
|||
|
|||
void OnGUI() |
|||
{ |
|||
// We can check if the localization system is ready using the InitializationOperation.
|
|||
// Initialization involves loading locales and optionally preloading localized data for the current locale.
|
|||
if (!LocalizationSettings.InitializationOperation.IsDone) |
|||
{ |
|||
GUILayout.Label("Initializing Localization"); |
|||
return; |
|||
} |
|||
|
|||
GUILayout.Label(m_TranslatedStringThisIsATest); |
|||
GUILayout.Label(m_TranslatedStringHello); |
|||
GUILayout.Label(m_TranslatedStringGoodbye); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 77ab5f1c88b311f468572c9131f8c04e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.ResourceManagement.AsyncOperations; |
|||
|
|||
namespace UnityEditor.Localization.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This example shows how to use GetLocalizedString to retrieve a localized string.
|
|||
/// </summary>
|
|||
public class LocalizedStringGetLocalizedStringExample : MonoBehaviour |
|||
{ |
|||
// A LocalizedString provides an interface to retrieving translated strings.
|
|||
// This example assumes a String Table Collection with the name "My String Table" and an entry with the Key "Hello World" exists.
|
|||
// You can change the Table Collection and Entry target in the inspector.
|
|||
public LocalizedString stringRef; |
|||
void OnGUI() |
|||
{ |
|||
|
|||
// This will make a request to the StringDatabase each time using the LocalizedString properties.
|
|||
var stringOperation = stringRef.GetLocalizedString(); |
|||
if (stringOperation.IsDone && stringOperation.Status == AsyncOperationStatus.Succeeded) |
|||
GUILayout.Label(stringOperation.Result); |
|||
} |
|||
private void Start() |
|||
{ |
|||
stringRef = new LocalizedString() { TableReference = "QuestlineDialogue", TableEntryReference = "SD-L1-S1-Q1-QL1" }; |
|||
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: a8a93043a9567c444af4dd0d7fa44993 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.Localization.Settings; |
|||
using UnityEngine.Localization.Tables; |
|||
|
|||
namespace UnityEditor.Localization.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This example shows how a <see cref="StringTable"> can be used directly in order to get translated
|
|||
/// strings for multiple entries using a <see cref="LocalizedStringTable>"/>.
|
|||
/// </summary>
|
|||
public class LocalizedStringTableExample : MonoBehaviour |
|||
{ |
|||
public LocalizedStringTable stringTable = new LocalizedStringTable { TableReference = "My Strings" }; |
|||
|
|||
// We will cache our translated strings
|
|||
string m_TranslatedStringHello; |
|||
string m_TranslatedStringGoodbye; |
|||
string m_TranslatedStringThisIsATest; |
|||
|
|||
void OnEnable() |
|||
{ |
|||
stringTable.TableChanged += LoadStrings; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
stringTable.TableChanged -= LoadStrings; |
|||
} |
|||
|
|||
void LoadStrings(StringTable stringTable) |
|||
{ |
|||
m_TranslatedStringHello = GetLocalizedString(stringTable, "Hello"); |
|||
m_TranslatedStringGoodbye = GetLocalizedString(stringTable, "Goodbye"); |
|||
m_TranslatedStringThisIsATest = GetLocalizedString(stringTable, "This is a test"); |
|||
} |
|||
|
|||
static string GetLocalizedString(StringTable table, string entryName) |
|||
{ |
|||
// Get the table entry. The entry contains the localized string and Metadata
|
|||
var entry = table.GetEntry(entryName); |
|||
return entry.GetLocalizedString(); // We can pass in optional arguments for Smart Format or String.Format here.
|
|||
} |
|||
|
|||
void OnGUI() |
|||
{ |
|||
// We can check if the localization system is ready using the InitializationOperation.
|
|||
// Initialization involves loading locales and optionally preloading localized data for the current locale.
|
|||
if (!LocalizationSettings.InitializationOperation.IsDone) |
|||
{ |
|||
GUILayout.Label("Initializing Localization"); |
|||
return; |
|||
} |
|||
|
|||
GUILayout.Label(m_TranslatedStringThisIsATest); |
|||
GUILayout.Label(m_TranslatedStringHello); |
|||
GUILayout.Label(m_TranslatedStringGoodbye); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f14bcb214c6b8ac47b373e6dff94fd2c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
|
|||
namespace UnityEditor.Localization.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This sample shows how to use the LocalizedString ChangeHandler to get a notification whenever a new translated string is available.
|
|||
/// This method is suited to dealing with static strings that will not change during game play for the selected Locale.
|
|||
/// </summary>
|
|||
public class LocalizedStringWithChangeHandlerExample : MonoBehaviour |
|||
{ |
|||
// A LocalizedString provides an interface to retrieving translated strings.
|
|||
// This example assumes a String Table Collection with the name "My String Table" and an entry with the Key "Hello World" exists.
|
|||
// You can change the Table Collection and Entry target in the inspector.
|
|||
public LocalizedString stringRef = new LocalizedString() { TableReference = "My String Table", TableEntryReference = "Hello World" }; |
|||
string m_TranslatedString; |
|||
|
|||
void OnEnable() |
|||
{ |
|||
stringRef.StringChanged += UpdateString; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
stringRef.StringChanged -= UpdateString; |
|||
} |
|||
|
|||
void UpdateString(string translatedValue) |
|||
{ |
|||
m_TranslatedString = translatedValue; |
|||
Debug.Log("Translated Value Updated: " + translatedValue); |
|||
} |
|||
|
|||
void OnGUI() |
|||
{ |
|||
GUILayout.Label(m_TranslatedString); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: c817f651d855b4242945e9291e2c8347 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.Localization.Settings; |
|||
using UnityEngine.ResourceManagement.AsyncOperations; |
|||
|
|||
namespace UnityEditor.Localization.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This example shows how to get a localized string using the StringDatabase.
|
|||
/// This example also shows some of the ways to wait for an AsyncOperationHandle to complete.
|
|||
/// </summary>
|
|||
public class StringDatabaseGetLocalizedStringExample : MonoBehaviour |
|||
{ |
|||
public bool useCoroutine; |
|||
|
|||
void OnEnable() |
|||
{ |
|||
LocalizationSettings.SelectedLocaleChanged += SelectedLocaleChanged; |
|||
UpdateString(); |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
LocalizationSettings.SelectedLocaleChanged -= SelectedLocaleChanged; |
|||
} |
|||
|
|||
void SelectedLocaleChanged(Locale locale) |
|||
{ |
|||
UpdateString(); |
|||
} |
|||
|
|||
void UpdateString() |
|||
{ |
|||
// Sometimes the localized value may not be immediately available.
|
|||
// The Localization system may not have been initialized yet or the String Table may need loading.
|
|||
// The AsyncOperation wraps this loading operation. We can yield on it in a coroutine,
|
|||
// use its various Completed Events or await its Task if using async and await.
|
|||
var stringOperation = LocalizationSettings.StringDatabase.GetLocalizedStringAsync("UI", "Start Game"); |
|||
if (stringOperation.IsDone) |
|||
SetString(stringOperation); |
|||
|
|||
if (useCoroutine) |
|||
StartCoroutine(LoadStringWithCoroutine(stringOperation)); |
|||
else |
|||
stringOperation.Completed += SetString; |
|||
} |
|||
|
|||
IEnumerator LoadStringWithCoroutine(AsyncOperationHandle<string> stringOperation) |
|||
{ |
|||
yield return stringOperation; |
|||
SetString(stringOperation); |
|||
} |
|||
|
|||
void SetString(AsyncOperationHandle<string> stringOperation) |
|||
{ |
|||
// Its possible that something may have gone wrong during loading. We can handle this locally
|
|||
// or ignore all errors as they will still be captured and reported by the Localization system.
|
|||
if (stringOperation.Status == AsyncOperationStatus.Failed) |
|||
Debug.LogError("Failed to load string"); |
|||
else |
|||
Debug.Log("Loaded String: " + stringOperation.Result); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e7be19f5637c7e746bab0a3fdd67788c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Serialization; |
|||
|
|||
[CreateAssetMenu(fileName = "QuestAnchor", menuName = "Quests/QuestAnchor", order = 51)] |
|||
public class QuestAncorSO : ScriptableObject |
|||
{ |
|||
[Header("Data")] |
|||
[SerializeField] private List<QuestlineSO> _questlines = default; |
|||
[SerializeField] private Inventory _inventory = default; |
|||
|
|||
|
|||
|
|||
[Header("Linstening to channels")] |
|||
[SerializeField] private VoidEventChannelSO _checkStepValidityEvent = default; |
|||
[SerializeField] private DialogueDataChannelSO _endDialogueEvent = default; |
|||
|
|||
[Header("Broadcasting on channels")] |
|||
[FormerlySerializedAs("_winDialogueEvent")] |
|||
[SerializeField] private VoidEventChannelSO _completeDialogueEvent = default; |
|||
[FormerlySerializedAs("_loseDialogueEvent")] |
|||
[SerializeField] private VoidEventChannelSO _incompleteDialogueEvent = default; |
|||
|
|||
[SerializeField] private ItemEventChannelSO _giveItemEvent = default; |
|||
[SerializeField] private ItemEventChannelSO _rewardItemEvent = default; |
|||
|
|||
private QuestSO _currentQuest=null; |
|||
private QuestlineSO _currentQuestline; |
|||
private StepSO _currentStep; |
|||
private int _currentQuestIndex = 0; |
|||
private int _currentQuestlineIndex = 0; |
|||
private int _currentStepIndex = 0; |
|||
|
|||
public void StartGame() |
|||
{//Add code for saved information
|
|||
if (_checkStepValidityEvent != null) |
|||
{ |
|||
_checkStepValidityEvent.OnEventRaised += CheckStepValidity; |
|||
} |
|||
if (_endDialogueEvent != null) |
|||
{ |
|||
_endDialogueEvent.OnEventRaised += EndDialogue; |
|||
} |
|||
StartQuestline(); |
|||
} |
|||
void StartQuestline() |
|||
{ |
|||
if (_questlines != null) |
|||
{ |
|||
if (_questlines.Exists(o => !o.IsDone)) |
|||
{ |
|||
_currentQuestlineIndex = _questlines.FindIndex(o => !o.IsDone); |
|||
if (_currentQuestlineIndex >= 0) |
|||
_currentQuestline = _questlines.Find(o => !o.IsDone); |
|||
} |
|||
|
|||
} |
|||
} |
|||
bool hasStep(ActorSO actorToCheckWith) |
|||
{ |
|||
if(_currentStep!=null) |
|||
{ |
|||
|
|||
if(_currentStep.Actor== actorToCheckWith) |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
} |
|||
return false; |
|||
|
|||
} |
|||
bool CheckQuestlineForQuestWithActor(ActorSO actorToCheckWith) |
|||
{ |
|||
if (_currentQuest == null)//check if there's a current quest
|
|||
{ |
|||
if (_currentQuestline != null) |
|||
{ |
|||
|
|||
return _currentQuestline.Quests.Exists(o => !o.IsDone && o.Steps != null && o.Steps[0].Actor == actorToCheckWith); |
|||
|
|||
} |
|||
|
|||
} |
|||
return false; |
|||
} |
|||
|
|||
public DialogueDataSO InteractWithCharacter(ActorSO actor, bool isCheckValidity, bool isValid) |
|||
{ |
|||
|
|||
if (_currentQuest == null) |
|||
{ |
|||
if (CheckQuestlineForQuestWithActor(actor)) |
|||
{ |
|||
StartQuest(actor); |
|||
} |
|||
|
|||
} |
|||
|
|||
if (hasStep(actor)) |
|||
{ |
|||
if (isCheckValidity) |
|||
{ |
|||
|
|||
if (isValid) |
|||
{ |
|||
return _currentStep.CompleteDialogue; |
|||
|
|||
} |
|||
else |
|||
{ |
|||
return _currentStep.IncompleteDialogue; |
|||
|
|||
} |
|||
|
|||
} |
|||
else |
|||
{ |
|||
return _currentStep.DialogueBeforeStep; |
|||
} |
|||
|
|||
} |
|||
return null; |
|||
|
|||
} |
|||
//When Interacting with a character, we ask the quest manager if there's a quest that starts with a step with a certain character
|
|||
void StartQuest(ActorSO actorToCheckWith) |
|||
{ |
|||
if (_currentQuest != null)//check if there's a current quest
|
|||
{ |
|||
return; |
|||
} |
|||
|
|||
if (_currentQuestline != null) |
|||
{ |
|||
//find quest index
|
|||
_currentQuestIndex = _currentQuestline.Quests.FindIndex(o => !o.IsDone && o.Steps != null && o.Steps[0].Actor == actorToCheckWith); |
|||
|
|||
if ((_currentQuestline.Quests.Count > _currentQuestIndex) && (_currentQuestIndex >= 0)) |
|||
{ |
|||
_currentQuest = _currentQuestline.Quests[_currentQuestIndex]; |
|||
//start Step
|
|||
_currentStepIndex = 0; |
|||
_currentStepIndex = _currentQuest.Steps.FindIndex(o => o.IsDone == false); |
|||
if (_currentStepIndex >= 0) |
|||
StartStep(); |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
void StartStep() |
|||
{ |
|||
if (_currentQuest.Steps != null) |
|||
if (_currentQuest.Steps.Count > _currentStepIndex) |
|||
{ |
|||
|
|||
_currentStep = _currentQuest.Steps[_currentStepIndex]; |
|||
} |
|||
|
|||
} |
|||
void CheckStepValidity() |
|||
{ |
|||
|
|||
if (_currentStep != null) |
|||
{ |
|||
switch (_currentStep.Type) |
|||
{ |
|||
case stepType.checkItem: |
|||
|
|||
if (_inventory.Contains(_currentStep.Item)) |
|||
{ |
|||
_inventory.Contains(_currentStep.Item); |
|||
//Trigger win dialogue
|
|||
_completeDialogueEvent.RaiseEvent(); |
|||
} |
|||
else |
|||
{ |
|||
//trigger lose dialogue
|
|||
_incompleteDialogueEvent.RaiseEvent(); |
|||
} |
|||
break; |
|||
case stepType.giveItem: |
|||
if (_inventory.Contains(_currentStep.Item)) |
|||
{ |
|||
_giveItemEvent.RaiseEvent(_currentStep.Item); |
|||
_completeDialogueEvent.RaiseEvent(); |
|||
} |
|||
else |
|||
{ |
|||
//trigger lose dialogue
|
|||
_incompleteDialogueEvent.RaiseEvent(); |
|||
|
|||
} |
|||
break; |
|||
case stepType.rewardItem: |
|||
_rewardItemEvent.RaiseEvent(_currentStep.Item); |
|||
//no dialogue is needed after Reward Item
|
|||
if(_currentStep.CompleteDialogue !=null) |
|||
{ |
|||
_completeDialogueEvent.RaiseEvent(); |
|||
} |
|||
else |
|||
{ |
|||
EndStep(); |
|||
} |
|||
break; |
|||
case stepType.dialogue: |
|||
//dialogue has already been played
|
|||
if (_currentStep.CompleteDialogue != null) |
|||
{ |
|||
|
|||
_completeDialogueEvent.RaiseEvent(); |
|||
} |
|||
else |
|||
{ |
|||
EndStep(); |
|||
} |
|||
break; |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
|||
void EndDialogue(DialogueDataSO dialogue) |
|||
{ |
|||
|
|||
//depending on the dialogue that ended, do something
|
|||
switch (dialogue.DialogueType) |
|||
{ |
|||
case DialogueType.winDialogue: |
|||
EndStep(); |
|||
break; |
|||
case DialogueType.startDialogue: |
|||
CheckStepValidity(); |
|||
break; |
|||
default: |
|||
break; |
|||
|
|||
} |
|||
|
|||
} |
|||
void EndStep() |
|||
{ |
|||
|
|||
_currentStep = null; |
|||
|
|||
if (_currentQuest != null) |
|||
if (_currentQuest.Steps.Count > _currentStepIndex) |
|||
{ |
|||
_currentQuest.Steps[_currentStepIndex].FinishStep(); |
|||
if (_currentQuest.Steps.Count > _currentStepIndex + 1) |
|||
{ |
|||
_currentStepIndex++; |
|||
StartStep(); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
|
|||
EndQuest(); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
void EndQuest() |
|||
{ |
|||
|
|||
if (_currentQuest != null) |
|||
_currentQuest.FinishQuest(); |
|||
|
|||
_currentQuest = null; |
|||
_currentQuestIndex = -1; |
|||
if (_currentQuestline != null) |
|||
{ |
|||
if (!_currentQuestline.Quests.Exists(o => !o.IsDone)) |
|||
{ |
|||
EndQuestline(); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
void EndQuestline() |
|||
{ |
|||
if (_questlines != null) |
|||
{ |
|||
if (_currentQuestline != null) |
|||
{ |
|||
_currentQuestline.FinishQuestline(); |
|||
|
|||
} |
|||
|
|||
if (_questlines.Exists(o => o.IsDone)) |
|||
{ |
|||
StartQuestline(); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Serialization; |
|||
public enum stepType |
|||
{ |
|||
dialogue, |
|||
giveItem, |
|||
checkItem, |
|||
rewardItem |
|||
} |
|||
[CreateAssetMenu(fileName = "step", menuName = "Quests/step", order = 51)] |
|||
public class StepSO : ScriptableObject |
|||
{ |
|||
|
|||
[Tooltip("The Character this mission will need interaction with")] |
|||
[SerializeField] |
|||
private ActorSO _actor = default; |
|||
[Tooltip("The dialogue that will be diplayed befor an action, if any")] |
|||
[SerializeField] |
|||
private DialogueDataSO _dialogueBeforeStep = default; |
|||
[Tooltip("The dialogue that will be diplayed when the step is achieved")] |
|||
[SerializeField] |
|||
[FormerlySerializedAs("_winDialogue")] |
|||
private DialogueDataSO _completeDialogue = default; |
|||
[Tooltip("The dialogue that will be diplayed if the step is not achieved yet")] |
|||
[SerializeField] |
|||
[FormerlySerializedAs("_loseDialogue")] |
|||
private DialogueDataSO _incompleteDialogue = default; |
|||
[Tooltip("The item to check/give/reward")] |
|||
[SerializeField] |
|||
private Item _item = default; |
|||
[Tooltip("The type of the step")] |
|||
[SerializeField] |
|||
private stepType _type = default; |
|||
[SerializeField] |
|||
bool _isDone = false; |
|||
public DialogueDataSO DialogueBeforeStep => _dialogueBeforeStep; |
|||
public DialogueDataSO CompleteDialogue => _completeDialogue; |
|||
public DialogueDataSO IncompleteDialogue => _incompleteDialogue; |
|||
public Item Item => _item; |
|||
public stepType Type => _type; |
|||
public bool IsDone => _isDone; |
|||
public ActorSO Actor => _actor; |
|||
|
|||
public void FinishStep() |
|||
{ |
|||
|
|||
_isDone = true; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue