From 35bd460011d2e086077cc3609d12206b4da5c43b Mon Sep 17 00:00:00 2001
From: Ding Yuntian <1491671119@qq.com>
Date: Thu, 19 Sep 2024 01:12:10 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E9=A2=91=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitattributes | 4 +
.idea/.idea.AIBIS Dream/.idea/encodings.xml | 1 +
AIBIS Dream.sln.DotSettings | 2 +
Assets/Resources/Audio.meta | 8 +
Assets/Resources/Audio/amb_main.ogg | 3 +
Assets/Resources/Audio/amb_main.ogg.meta | 23 +
Assets/Resources/Audio/voice_me_1.ogg | 3 +
Assets/Resources/Audio/voice_me_1.ogg.meta | 23 +
Assets/Resources/Audio/voice_me_2.ogg | 3 +
Assets/Resources/Audio/voice_me_2.ogg.meta | 23 +
Assets/Resources/Audio/voice_me_3.ogg | 3 +
Assets/Resources/Audio/voice_me_3.ogg.meta | 23 +
Assets/Resources/Audio/voice_peipei_1.ogg | 3 +
.../Resources/Audio/voice_peipei_1.ogg.meta | 23 +
Assets/Resources/Audio/voice_peipei_2.ogg | 3 +
.../Resources/Audio/voice_peipei_2.ogg.meta | 23 +
Assets/Resources/Audio/voice_peipei_3.ogg | 3 +
.../Resources/Audio/voice_peipei_3.ogg.meta | 23 +
.../Yarn/OptionTest/OptionTest1.yarn | 4 +-
Assets/Scenes/Persistence.unity | 823 +++++++++++++++++-
Assets/Scripts/Dialog System/AudioView.cs | 11 +-
.../Scripts/Dialog System/DialogController.cs | 1 +
Assets/Scripts/Dialog System/LineView.cs | 28 +-
Assets/Scripts/Framework.meta | 8 +
Assets/Scripts/Framework/AudioKit.meta | 3 +
Assets/Scripts/Framework/AudioKit/AudioKit.cs | 13 +
.../Framework/AudioKit/AudioKit.cs.meta | 3 +
.../Framework/AudioKit/AudioManager.cs | 246 ++++++
.../Framework/AudioKit/AudioManager.cs.meta | 11 +
.../Scripts/Framework/AudioKit/AudioPlayer.cs | 26 +
.../Framework/AudioKit/AudioPlayer.cs.meta | 11 +
Assets/Scripts/{ => Framework}/Config.meta | 0
.../{ => Framework}/Config/Character.cs | 2 +-
.../{ => Framework}/Config/Character.cs.meta | 0
.../{ => Framework}/Config/ConfigUtil.cs | 10 +-
.../{ => Framework}/Config/ConfigUtil.cs.meta | 0
Assets/Scripts/Framework/PoolKit.meta | 8 +
Assets/Scripts/Framework/PoolKit/Factory.meta | 8 +
.../PoolKit/Factory/CustomObjectFactory.cs | 23 +
.../Factory/CustomObjectFactory.cs.meta | 3 +
.../PoolKit/Factory/DefaultObjectFactory.cs | 14 +
.../Factory/DefaultObjectFactory.cs.meta | 3 +
.../PoolKit/Factory/IObjectFactory.cs | 15 +
.../PoolKit/Factory/IObjectFactory.cs.meta | 3 +
Assets/Scripts/Framework/PoolKit/Pool.meta | 8 +
.../Scripts/Framework/PoolKit/Pool/IPool.cs | 22 +
.../Framework/PoolKit/Pool/IPool.cs.meta | 11 +
.../Framework/PoolKit/Pool/IPoolType.cs | 11 +
.../Framework/PoolKit/Pool/IPoolType.cs.meta | 11 +
.../Framework/PoolKit/Pool/IPoolable.cs | 12 +
.../Framework/PoolKit/Pool/IPoolable.cs.meta | 11 +
Assets/Scripts/Framework/PoolKit/Pool/Pool.cs | 66 ++
.../Framework/PoolKit/Pool/Pool.cs.meta | 11 +
.../Framework/PoolKit/SafeObjectPool.cs | 116 +++
.../Framework/PoolKit/SafeObjectPool.cs.meta | 3 +
.../Framework/PoolKit/SimpleObjectPool.cs | 33 +
.../PoolKit/SimpleObjectPool.cs.meta | 3 +
Assets/Scripts/Framework/SingletonKit.meta | 8 +
.../Framework/SingletonKit/ISingleton.cs | 17 +
.../Framework/SingletonKit/ISingleton.cs.meta | 11 +
.../SingletonKit}/Singleton.cs | 9 +-
.../SingletonKit}/Singleton.cs.meta | 0
.../SingletonKit}/SingletonBase.cs | 7 +-
.../SingletonKit}/SingletonBase.cs.meta | 0
.../Framework/SingletonKit/SingletonProp.cs | 52 ++
.../SingletonKit/SingletonProp.cs.meta | 3 +
Assets/Scripts/Game Loop/GameLoopManager.cs | 4 +-
Assets/Scripts/Game Loop/SceneLoader.cs | 1 +
.../Scripts/MainScene/MainSceneController.cs | 1 +
Assets/Scripts/UI/DialogUI/DialogBoxBase.cs | 6 +-
.../Scripts/UI/DialogUI/DialogBubbleViewer.cs | 22 +-
.../UI/DialogUI/DialogCanvasManager.cs | 6 +-
Assets/Scripts/UI/DialogUI/DialogUiViewer.cs | 4 +-
Assets/Scripts/UI/DialogUI/IDialogView.cs | 10 +-
Assets/Scripts/UI/MainUIViewer.cs | 8 +-
Assets/Scripts/UI/StartMenuViewer.cs | 4 +-
Assets/Scripts/Utility/YarnUtil.cs | 2 +-
Assets/Settings/Main Mixer.mixer | 279 ++++++
Assets/Settings/Main Mixer.mixer.meta | 8 +
Assets/StreamingAssets/Config/character.csv | 10 +-
80 files changed, 2205 insertions(+), 59 deletions(-)
create mode 100644 AIBIS Dream.sln.DotSettings
create mode 100644 Assets/Resources/Audio.meta
create mode 100644 Assets/Resources/Audio/amb_main.ogg
create mode 100644 Assets/Resources/Audio/amb_main.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_me_1.ogg
create mode 100644 Assets/Resources/Audio/voice_me_1.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_me_2.ogg
create mode 100644 Assets/Resources/Audio/voice_me_2.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_me_3.ogg
create mode 100644 Assets/Resources/Audio/voice_me_3.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_peipei_1.ogg
create mode 100644 Assets/Resources/Audio/voice_peipei_1.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_peipei_2.ogg
create mode 100644 Assets/Resources/Audio/voice_peipei_2.ogg.meta
create mode 100644 Assets/Resources/Audio/voice_peipei_3.ogg
create mode 100644 Assets/Resources/Audio/voice_peipei_3.ogg.meta
create mode 100644 Assets/Scripts/Framework.meta
create mode 100644 Assets/Scripts/Framework/AudioKit.meta
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioKit.cs
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioKit.cs.meta
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioManager.cs
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioManager.cs.meta
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioPlayer.cs
create mode 100644 Assets/Scripts/Framework/AudioKit/AudioPlayer.cs.meta
rename Assets/Scripts/{ => Framework}/Config.meta (100%)
rename Assets/Scripts/{ => Framework}/Config/Character.cs (97%)
rename Assets/Scripts/{ => Framework}/Config/Character.cs.meta (100%)
rename Assets/Scripts/{ => Framework}/Config/ConfigUtil.cs (93%)
rename Assets/Scripts/{ => Framework}/Config/ConfigUtil.cs.meta (100%)
create mode 100644 Assets/Scripts/Framework/PoolKit.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPool.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPool.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/Pool.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/Pool/Pool.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs.meta
create mode 100644 Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs
create mode 100644 Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs.meta
create mode 100644 Assets/Scripts/Framework/SingletonKit.meta
create mode 100644 Assets/Scripts/Framework/SingletonKit/ISingleton.cs
create mode 100644 Assets/Scripts/Framework/SingletonKit/ISingleton.cs.meta
rename Assets/Scripts/{Utility => Framework/SingletonKit}/Singleton.cs (71%)
rename Assets/Scripts/{Utility => Framework/SingletonKit}/Singleton.cs.meta (100%)
rename Assets/Scripts/{Utility => Framework/SingletonKit}/SingletonBase.cs (79%)
rename Assets/Scripts/{Utility => Framework/SingletonKit}/SingletonBase.cs.meta (100%)
create mode 100644 Assets/Scripts/Framework/SingletonKit/SingletonProp.cs
create mode 100644 Assets/Scripts/Framework/SingletonKit/SingletonProp.cs.meta
create mode 100644 Assets/Settings/Main Mixer.mixer
create mode 100644 Assets/Settings/Main Mixer.mixer.meta
diff --git a/.gitattributes b/.gitattributes
index dbc9373c8..ea8887e9d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -68,3 +68,7 @@
*.ttf filter=lfs diff=lfs merge=lfs -text
*.TTF filter=lfs diff=lfs merge=lfs -text
*SDF.asset filter=lfs diff=lfs merge=lfs -text
+*.png filter=lfs diff=lfs merge=lfs -text
+*.jpg filter=lfs diff=lfs merge=lfs -text
+*.jprg filter=lfs diff=lfs merge=lfs -text
+*.ogg filter=lfs diff=lfs merge=lfs -text
diff --git a/.idea/.idea.AIBIS Dream/.idea/encodings.xml b/.idea/.idea.AIBIS Dream/.idea/encodings.xml
index d9a3d95d4..19fc2b194 100644
--- a/.idea/.idea.AIBIS Dream/.idea/encodings.xml
+++ b/.idea/.idea.AIBIS Dream/.idea/encodings.xml
@@ -6,6 +6,7 @@
+
diff --git a/AIBIS Dream.sln.DotSettings b/AIBIS Dream.sln.DotSettings
new file mode 100644
index 000000000..615ef192c
--- /dev/null
+++ b/AIBIS Dream.sln.DotSettings
@@ -0,0 +1,2 @@
+
+ True
\ No newline at end of file
diff --git a/Assets/Resources/Audio.meta b/Assets/Resources/Audio.meta
new file mode 100644
index 000000000..47ce600ee
--- /dev/null
+++ b/Assets/Resources/Audio.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ec612c41e359b144981bb99e30161c71
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/amb_main.ogg b/Assets/Resources/Audio/amb_main.ogg
new file mode 100644
index 000000000..89fab4246
--- /dev/null
+++ b/Assets/Resources/Audio/amb_main.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:da4b11e854bf03db9b989681594eaed3122439dc4d1d62f394a70758c22770cb
+size 813453
diff --git a/Assets/Resources/Audio/amb_main.ogg.meta b/Assets/Resources/Audio/amb_main.ogg.meta
new file mode 100644
index 000000000..ea824dc24
--- /dev/null
+++ b/Assets/Resources/Audio/amb_main.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: a462991fdfb43334bbed965d98923923
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_me_1.ogg b/Assets/Resources/Audio/voice_me_1.ogg
new file mode 100644
index 000000000..7efae1dc7
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_1.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:694e913a8d0f2962608ad971bbd0e825f618a12a96130b99df40abb147e58ed6
+size 561816
diff --git a/Assets/Resources/Audio/voice_me_1.ogg.meta b/Assets/Resources/Audio/voice_me_1.ogg.meta
new file mode 100644
index 000000000..c2b7ede19
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_1.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: e872d8bcd39dc344ea98c6410537b060
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_me_2.ogg b/Assets/Resources/Audio/voice_me_2.ogg
new file mode 100644
index 000000000..dacbcf838
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_2.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aa298ae21c12fd4e3f5a0ec94ef59b2abb853558dddec10523acff8b67a5f2d5
+size 462609
diff --git a/Assets/Resources/Audio/voice_me_2.ogg.meta b/Assets/Resources/Audio/voice_me_2.ogg.meta
new file mode 100644
index 000000000..544b48b8f
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_2.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: d5a8b692175f7b54b922f22470dd42ee
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_me_3.ogg b/Assets/Resources/Audio/voice_me_3.ogg
new file mode 100644
index 000000000..9b3bedb1f
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_3.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6240fd7e3ab279465c8bb37532dcea9595fcc0dbc28c1d54103a6edb9c55dcd2
+size 462609
diff --git a/Assets/Resources/Audio/voice_me_3.ogg.meta b/Assets/Resources/Audio/voice_me_3.ogg.meta
new file mode 100644
index 000000000..ad5d7a77d
--- /dev/null
+++ b/Assets/Resources/Audio/voice_me_3.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: d111666dd430c5b43ba38d0b32955c68
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_peipei_1.ogg b/Assets/Resources/Audio/voice_peipei_1.ogg
new file mode 100644
index 000000000..b19ec6fc0
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_1.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:36f8da0df7c42b0d23bd178c20e39dc2addcf2e2715fa366ab2b8cb9821576aa
+size 623121
diff --git a/Assets/Resources/Audio/voice_peipei_1.ogg.meta b/Assets/Resources/Audio/voice_peipei_1.ogg.meta
new file mode 100644
index 000000000..5bd1fc58f
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_1.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 5b36cfb6132fa954a9832bc8fcbe291a
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_peipei_2.ogg b/Assets/Resources/Audio/voice_peipei_2.ogg
new file mode 100644
index 000000000..e065dfc39
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_2.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:72aad341ad83364c08981fb52928d1ab3cc24d267c91f2263dda8aa413002252
+size 541065
diff --git a/Assets/Resources/Audio/voice_peipei_2.ogg.meta b/Assets/Resources/Audio/voice_peipei_2.ogg.meta
new file mode 100644
index 000000000..7faa67bb3
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_2.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: dd82081a53dbadb458af22cf3c9e3f72
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Audio/voice_peipei_3.ogg b/Assets/Resources/Audio/voice_peipei_3.ogg
new file mode 100644
index 000000000..d63ac6b30
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_3.ogg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6950e8d225e03166ba2d37cb08798b62942fb3708f3b170195202fb672905978
+size 584467
diff --git a/Assets/Resources/Audio/voice_peipei_3.ogg.meta b/Assets/Resources/Audio/voice_peipei_3.ogg.meta
new file mode 100644
index 000000000..434e7659e
--- /dev/null
+++ b/Assets/Resources/Audio/voice_peipei_3.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: e858e4e20144d22449bd42bd20320c7e
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 7
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 1
+ conversionMode: 0
+ preloadAudioData: 0
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Yarn/OptionTest/OptionTest1.yarn b/Assets/Resources/Yarn/OptionTest/OptionTest1.yarn
index 98a4e0a6f..6db56c081 100644
--- a/Assets/Resources/Yarn/OptionTest/OptionTest1.yarn
+++ b/Assets/Resources/Yarn/OptionTest/OptionTest1.yarn
@@ -1,8 +1,8 @@
title: Start
---
<>
-[character key="2"]我: [/character]这是选项测试文件 #line:069537f
-我: 做一点测试
+me: 这是选项测试文件 #line:069537f
+peipei: 做一点测试
-> 选项一
-> 选项二
-> 超长选项测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试
diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity
index d82b40fb2..04dd751d0 100644
--- a/Assets/Scenes/Persistence.unity
+++ b/Assets/Scenes/Persistence.unity
@@ -123,6 +123,185 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
+--- !u!1 &40915749
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 40915750}
+ - component: {fileID: 40915751}
+ m_Layer: 0
+ m_Name: Audio Manager
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &40915750
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 40915749}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 1410207950}
+ - {fileID: 460780905}
+ - {fileID: 57390246}
+ - {fileID: 1403040025}
+ - {fileID: 868192523}
+ - {fileID: 262337781}
+ m_Father: {fileID: 1009826577}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &40915751
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 40915749}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: d02d13e0ef27eb544b62d5a8d296f2ee, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ fadeTime: 1
+--- !u!1 &57390245
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 57390246}
+ - component: {fileID: 57390247}
+ m_Layer: 0
+ m_Name: Voice
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &57390246
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 57390245}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &57390247
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 57390245}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: -2297450186869358485, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 0}
+ m_PlayOnAwake: 0
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 0
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!224 &62394964 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7131956091114956203, guid: e2211373480d40243a377721316dd8f7, type: 3}
@@ -458,6 +637,134 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
+--- !u!1 &262337780
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 262337781}
+ - component: {fileID: 262337782}
+ m_Layer: 0
+ m_Name: Amb2
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &262337781
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 262337780}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &262337782
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 262337780}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: -4767431408014039957, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 0}
+ m_PlayOnAwake: 0
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 1
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!1 &331068878
GameObject:
m_ObjectHideFlags: 0
@@ -570,6 +877,134 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6c926f9749bfa894eaaff47ec3a43a64, type: 3}
m_Name:
m_EditorClassIdentifier:
+--- !u!1 &460780904
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 460780905}
+ - component: {fileID: 460780906}
+ m_Layer: 0
+ m_Name: Interaction
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &460780905
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 460780904}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &460780906
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 460780904}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: -1154322574682727772, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 0}
+ m_PlayOnAwake: 0
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 0
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!1 &494300778
GameObject:
m_ObjectHideFlags: 0
@@ -1099,7 +1534,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 18a3ec3914131d44199ae33902edf159, type: 3}
m_Name:
m_EditorClassIdentifier:
- runMode: 1
+ runMode: 0
firstTalkSO: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2}
clinicScene: ClinicScene
testYarnProject: OptionTest
@@ -1568,6 +2003,134 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 791733123}
m_CullTransparentMesh: 1
+--- !u!1 &868192522
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 868192523}
+ - component: {fileID: 868192524}
+ m_Layer: 0
+ m_Name: Amb1
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &868192523
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 868192522}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &868192524
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 868192522}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: 1773163451604355202, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 8300000, guid: a462991fdfb43334bbed965d98923923, type: 3}
+ m_PlayOnAwake: 1
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 1
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!1 &886733270
GameObject:
m_ObjectHideFlags: 0
@@ -2025,6 +2588,7 @@ Transform:
- {fileID: 72512886}
- {fileID: 719228339}
- {fileID: 886733272}
+ - {fileID: 40915750}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1015707783
@@ -2782,6 +3346,262 @@ Transform:
- {fileID: 515480973}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1403040024
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1403040025}
+ - component: {fileID: 1403040026}
+ m_Layer: 0
+ m_Name: Memery
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1403040025
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1403040024}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &1403040026
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1403040024}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: -6773993072664640036, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 0}
+ m_PlayOnAwake: 0
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 0
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+--- !u!1 &1410207949
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1410207950}
+ - component: {fileID: 1410207951}
+ m_Layer: 0
+ m_Name: Loop
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1410207950
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1410207949}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 40915750}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!82 &1410207951
+AudioSource:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1410207949}
+ m_Enabled: 1
+ serializedVersion: 4
+ OutputAudioMixerGroup: {fileID: 8866379113506573767, guid: b14347481450a234a852407119bfecb4, type: 2}
+ m_audioClip: {fileID: 0}
+ m_PlayOnAwake: 0
+ m_Volume: 1
+ m_Pitch: 1
+ Loop: 1
+ Mute: 0
+ Spatialize: 0
+ SpatializePostEffects: 0
+ Priority: 128
+ DopplerLevel: 1
+ MinDistance: 1
+ MaxDistance: 500
+ Pan2D: 0
+ rolloffMode: 0
+ BypassEffects: 0
+ BypassListenerEffects: 0
+ BypassReverbZones: 0
+ rolloffCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ - serializedVersion: 3
+ time: 1
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ panLevelCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ spreadCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ reverbZoneMixCustomCurve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 3
+ time: 0
+ value: 1
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ weightedMode: 0
+ inWeight: 0.33333334
+ outWeight: 0.33333334
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!1 &1450136609
GameObject:
m_ObjectHideFlags: 0
@@ -3987,7 +4807,6 @@ MonoBehaviour:
_variableStorage: {fileID: 667130563}
dialogueViews:
- {fileID: 1584263515}
- - {fileID: 973075154}
- {fileID: 494300780}
startNode: Start
startAutomatically: 0
diff --git a/Assets/Scripts/Dialog System/AudioView.cs b/Assets/Scripts/Dialog System/AudioView.cs
index 708bc2968..e96ab6292 100644
--- a/Assets/Scripts/Dialog System/AudioView.cs
+++ b/Assets/Scripts/Dialog System/AudioView.cs
@@ -1,6 +1,5 @@
using System;
-using System.Collections;
-using System.Collections.Generic;
+using AibisDream.Utility;
using UnityEngine;
using Yarn.Unity;
@@ -10,6 +9,12 @@ namespace AibisDream
{
public override void RunLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
{
+ var voicePath = dialogueLine.GetCharacterVo().voicePath;
+ Debug.Log(voicePath);
+ if (!string.IsNullOrWhiteSpace(voicePath))
+ {
+ AudioManager.Instance.RandomPlayVoice(voicePath);
+ }
base.RunLine(dialogueLine, onDialogueLineFinished);
}
@@ -25,7 +30,7 @@ namespace AibisDream
public override void UserRequestedViewAdvancement()
{
- base.UserRequestedViewAdvancement();
+ AudioManager.Instance.StopVoice();
}
}
}
diff --git a/Assets/Scripts/Dialog System/DialogController.cs b/Assets/Scripts/Dialog System/DialogController.cs
index 43ef5e4bf..6df876afd 100644
--- a/Assets/Scripts/Dialog System/DialogController.cs
+++ b/Assets/Scripts/Dialog System/DialogController.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using AibisDream.Kit;
using AibisDream.Utility;
using UnityEngine;
using UnityEngine.Events;
diff --git a/Assets/Scripts/Dialog System/LineView.cs b/Assets/Scripts/Dialog System/LineView.cs
index 352170fa5..ae9efa96e 100644
--- a/Assets/Scripts/Dialog System/LineView.cs
+++ b/Assets/Scripts/Dialog System/LineView.cs
@@ -1,5 +1,5 @@
using System;
-using AibisDream.Utility;
+using AibisDream.Utility;
using Yarn.Unity;
namespace AibisDream
@@ -20,7 +20,9 @@ namespace AibisDream
return;
}
- HandleLineOutput(dialogueLine, onDialogueLineFinished);
+ Action jumpVoice = SkipVoice;
+ HandleLineOutput(dialogueLine, jumpVoice, onDialogueLineFinished);
+ HandleVoiceOutput(dialogueLine);
if (DialogController.Instance.quickRunMode)
{
@@ -28,13 +30,28 @@ namespace AibisDream
}
}
- private void HandleLineOutput(LocalizedLine dialogueLine, Action onDialogueLineFinished)
+ private void HandleLineOutput(LocalizedLine dialogueLine, Action onTextShowed, Action onDialogueLineFinished)
{
// 对话系统正在交谈状态
DialogController.Instance.IsTalking = true;
-
+
DialogCanvasManager.GetCurView().ShowLine(dialogueLine.TextWithoutCharacterName.Text,
- dialogueLine.GetCharacterVo(), onDialogueLineFinished, dialogueLine.IsAutoSkipLine());
+ dialogueLine.GetCharacterVo(), onDialogueLineFinished, onTextShowed, dialogueLine.IsAutoSkipLine());
+ }
+
+ private void HandleVoiceOutput(LocalizedLine dialogueLine)
+ {
+ // 播放语音
+ var voicePath = dialogueLine.GetCharacterVo().voicePath;
+ if (!string.IsNullOrWhiteSpace(voicePath))
+ {
+ AudioManager.Instance.RandomPlayVoice(voicePath);
+ }
+ }
+
+ private void SkipVoice()
+ {
+ AudioManager.Instance.StopVoice();
}
public override void RunOptions(DialogueOption[] dialogueOptions, Action onOptionSelected)
@@ -74,6 +91,7 @@ namespace AibisDream
if (!DialogCanvasManager.GetCurView().TrySkipLine())
{
+ AudioManager.Instance.StopVoice();
requestInterrupt.Invoke();
}
}
diff --git a/Assets/Scripts/Framework.meta b/Assets/Scripts/Framework.meta
new file mode 100644
index 000000000..3a5e2d534
--- /dev/null
+++ b/Assets/Scripts/Framework.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 76c766d9b810dd64a90fd22657b5f64a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/AudioKit.meta b/Assets/Scripts/Framework/AudioKit.meta
new file mode 100644
index 000000000..68b66c7a8
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 9f348632c8d94f6bb59775319acabb52
+timeCreated: 1726473982
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/AudioKit/AudioKit.cs b/Assets/Scripts/Framework/AudioKit/AudioKit.cs
new file mode 100644
index 000000000..10906e26e
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioKit.cs
@@ -0,0 +1,13 @@
+namespace AibisDream.Kit
+{
+ public class AudioKit : Singleton
+ {
+ public AudioPlayer MusicPlayer { get; private set; }
+ public AudioPlayer VoicePlayer { get; private set; }
+
+ public override void OnSingletonInit()
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/AudioKit/AudioKit.cs.meta b/Assets/Scripts/Framework/AudioKit/AudioKit.cs.meta
new file mode 100644
index 000000000..16935de4f
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioKit.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: ff78cd5fd6a74902945f20346bc2036d
+timeCreated: 1726662840
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/AudioKit/AudioManager.cs b/Assets/Scripts/Framework/AudioKit/AudioManager.cs
new file mode 100644
index 000000000..0d68877af
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioManager.cs
@@ -0,0 +1,246 @@
+using System.Collections;
+using AibisDream.Kit;
+using UnityEngine;
+using Yarn.Unity;
+
+namespace AibisDream
+{
+ public class AudioManager : Singleton
+ {
+ private const string LoopSource = "Loop";
+ private const string InteractionSource = "Interaction";
+ private const string VoiceSource = "Voice";
+ private const string MemorySource = "Memery";
+ private const string Amb1Source = "Amb1";
+ private const string Amb2Source = "Amb2";
+
+ private AudioSource _loopSource;
+ private AudioSource _interactionSource;
+ private AudioSource _voiceSource;
+ private AudioSource _memorySource;
+ private AudioSource _amb1Source;
+ private AudioSource _amb2Source;
+
+ public float fadeTime;
+
+ public override void OnSingletonInit()
+ {
+ _loopSource = transform.Find(LoopSource).GetComponent();
+ _interactionSource = transform.Find(InteractionSource).GetComponent();
+ _voiceSource = transform.Find(VoiceSource).GetComponent();
+ _memorySource = transform.Find(MemorySource).GetComponent();
+ _amb1Source = transform.Find(Amb1Source).GetComponent();
+ _amb2Source = transform.Find(Amb2Source).GetComponent();
+ }
+
+ #region 随机播放
+
+ public void RandomPlayVoice(string voicePath)
+ {
+ AudioClip clip = RandomLoadAudioClip(3, $"Audio/{voicePath}");
+ _voiceSource.clip = clip;
+ _voiceSource.Play();
+ }
+
+ [YarnCommand("random_play_interaction")]
+ public static void RandomPlayInteraction(string interactionName)
+ {
+ AudioClip clip = Instance.RandomLoadAudioClip(3, $"Audio/{interactionName}");
+ if (clip == null)
+ {
+ clip = Resources.Load($"Audio/{interactionName}");
+ }
+
+ Instance._voiceSource.clip = clip;
+ Instance._voiceSource.Play();
+ }
+
+ public void StopVoice()
+ {
+ if (_voiceSource.isPlaying)
+ {
+ _voiceSource.Stop();
+ }
+ }
+
+ [YarnCommand("stop_interaction")]
+ public static void StopInteraction()
+ {
+ Instance._interactionSource.Stop();
+ }
+
+ #endregion
+
+ #region 播放唱歌
+
+ public void PlayVoice(string actorName, string voiceName)
+ {
+ AudioClip clip = RandomLoadAudioClip(3, $"Audio/{actorName}");
+ _voiceSource.clip = clip;
+ _voiceSource.Play();
+ }
+
+ #endregion
+
+ #region 循环播放
+
+ [YarnCommand("play_loop_audio")]
+ public static void PlayLoopAudio(string audioName)
+ {
+ AudioClip clip = Resources.Load($"Audio/{audioName}");
+ if (clip == null)
+ {
+ clip = Instance.RandomLoadAudioClip(3, $"Audio/{audioName}");
+ }
+
+ Instance._loopSource.clip = clip;
+ Instance._loopSource.Play();
+ }
+
+ [YarnCommand("pause_loop_audio")]
+ public static void PauseLoopAudio()
+ {
+ Instance._loopSource.Pause();
+ }
+
+ public void ContinueLoopAudio()
+ {
+ _loopSource.UnPause();
+ }
+
+ public bool IsLoopPlaying()
+ {
+ return _loopSource.isPlaying;
+ }
+
+ #endregion
+
+ #region 背景音循环播放
+
+ [YarnCommand("play_amb1_audio")]
+ public static void PlayAmb1Audio(string audioName)
+ {
+ Instance._amb1Source.Stop();
+ AudioClip clip = Resources.Load($"Audio/{audioName}");
+ Instance._amb1Source.clip = clip;
+ Instance._amb1Source.volume = 0f;
+ Instance._amb1Source.Play();
+ Instance.StartCoroutine(Instance.FadeTo(1.0f, Instance.fadeTime, Instance._amb1Source));
+ }
+
+ [YarnCommand("pause_amb1_audio")]
+ public static void PauseAmb1Audio()
+ {
+ Instance._amb1Source.Pause();
+ }
+
+ [YarnCommand("fade_out_amb1_audio")]
+ public static void FadeOutAmb1Audio()
+ {
+ Instance.StartCoroutine(Instance.FadeTo(0.0f, Instance.fadeTime, Instance._amb1Source));
+ }
+
+ public void ContinueAmb1Audio()
+ {
+ _amb1Source.volume = 0.0f;
+ _amb1Source.UnPause();
+ StartCoroutine(FadeTo(1.0f, fadeTime, _amb1Source));
+ }
+
+ [YarnCommand("play_amb2_audio")]
+ public static void PlayAmb2Audio(string audioName)
+ {
+ Instance._amb2Source.Stop();
+ AudioClip clip = Resources.Load($"Audio/{audioName}");
+ Instance._amb2Source.clip = clip;
+ Instance._amb2Source.volume = 0f;
+ Instance._amb2Source.Play();
+ Instance.StartCoroutine(Instance.FadeTo(1.0f, Instance.fadeTime, Instance._amb2Source));
+ }
+
+ [YarnCommand("pause_amb2_audio")]
+ public static void PauseAmb2Audio()
+ {
+ Instance._amb2Source.Pause();
+ }
+
+ [YarnCommand("fade_out_amb2_audio")]
+ public static void FadeOutAmb2Audio()
+ {
+ Instance.StartCoroutine(Instance.FadeTo(0.0f, Instance.fadeTime, Instance._amb2Source));
+ }
+
+ public void ContinueAmb2Audio()
+ {
+ _amb2Source.volume = 0.0f;
+ _amb2Source.UnPause();
+ StartCoroutine(FadeTo(1.0f, fadeTime, _amb2Source));
+ }
+
+ #endregion
+
+ #region 播放记忆
+
+ public void PlayMemoryAudio(string memoryName)
+ {
+ StartCoroutine(AsyncPlayMemoryAudio(memoryName));
+ }
+
+ public void PauseMemoryAudio()
+ {
+ _memorySource.Pause();
+ }
+
+ public void ContinueMemoryAudio()
+ {
+ _memorySource.volume = 0.0f;
+ _memorySource.Play();
+ StartCoroutine(FadeTo(1.0f, fadeTime, _memorySource));
+ }
+
+ #endregion
+
+ public void FadeInLoopAudio(string audioName)
+ {
+ AudioClip clip = Resources.Load(audioName);
+ _loopSource.clip = clip;
+ _loopSource.volume = 0.0f;
+ _loopSource.Play();
+ StartCoroutine(FadeTo(1.0f, 5f, _loopSource));
+ }
+
+ private IEnumerator FadeTo(float targetVolume, float duration, AudioSource audioSource)
+ {
+ float startVolume = audioSource.volume;
+ float timeElapsed = 0f;
+
+ while (timeElapsed < duration)
+ {
+ timeElapsed += Time.deltaTime;
+ audioSource.volume = Mathf.Lerp(startVolume, targetVolume, timeElapsed / duration);
+ yield return null;
+ }
+
+ audioSource.volume = targetVolume;
+ }
+
+ private AudioClip RandomLoadAudioClip(int audioSize, string path)
+ {
+ int randomIndex = Random.Range(0, audioSize) + 1;
+ return Resources.Load($"{path}_{randomIndex}");
+ }
+
+ private IEnumerator AsyncPlayMemoryAudio(string memoryName)
+ {
+ AudioClip intro = Resources.Load($"Audio/mem_play");
+ AudioClip loop = Resources.Load($"Audio/{memoryName}");
+ _memorySource.clip = intro;
+ _memorySource.loop = false;
+ _memorySource.Play();
+ yield return new WaitForSeconds(intro.length);
+ _memorySource.clip = loop;
+ _memorySource.loop = true;
+ _memorySource.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/AudioKit/AudioManager.cs.meta b/Assets/Scripts/Framework/AudioKit/AudioManager.cs.meta
new file mode 100644
index 000000000..43f58d381
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d02d13e0ef27eb544b62d5a8d296f2ee
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs b/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs
new file mode 100644
index 000000000..40448a1a6
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs
@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace AibisDream.Kit
+{
+ public class AudioPlayer : IPoolable, IPoolType
+ {
+ #region 对象池功能
+
+ public void OnRecycled()
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool IsRecycled { get; set; }
+
+ public void Recycle2Cache()
+ {
+ throw new System.NotImplementedException();
+ }
+
+ #endregion
+ }
+}
+
diff --git a/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs.meta b/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs.meta
new file mode 100644
index 000000000..10b0f5b21
--- /dev/null
+++ b/Assets/Scripts/Framework/AudioKit/AudioPlayer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5c877314dfb3460d91eef3edfe2786c6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Config.meta b/Assets/Scripts/Framework/Config.meta
similarity index 100%
rename from Assets/Scripts/Config.meta
rename to Assets/Scripts/Framework/Config.meta
diff --git a/Assets/Scripts/Config/Character.cs b/Assets/Scripts/Framework/Config/Character.cs
similarity index 97%
rename from Assets/Scripts/Config/Character.cs
rename to Assets/Scripts/Framework/Config/Character.cs
index 731f88d8a..1ccd7bfd3 100644
--- a/Assets/Scripts/Config/Character.cs
+++ b/Assets/Scripts/Framework/Config/Character.cs
@@ -1,4 +1,4 @@
-namespace AibisDream.Config
+namespace AibisDream.Kit
{
public class Character
{
diff --git a/Assets/Scripts/Config/Character.cs.meta b/Assets/Scripts/Framework/Config/Character.cs.meta
similarity index 100%
rename from Assets/Scripts/Config/Character.cs.meta
rename to Assets/Scripts/Framework/Config/Character.cs.meta
diff --git a/Assets/Scripts/Config/ConfigUtil.cs b/Assets/Scripts/Framework/Config/ConfigUtil.cs
similarity index 93%
rename from Assets/Scripts/Config/ConfigUtil.cs
rename to Assets/Scripts/Framework/Config/ConfigUtil.cs
index 5cc0e1b93..ee5fd2c39 100644
--- a/Assets/Scripts/Config/ConfigUtil.cs
+++ b/Assets/Scripts/Framework/Config/ConfigUtil.cs
@@ -1,9 +1,8 @@
using System.Collections.Generic;
using System.Linq;
-using AibisDream.Utility;
using UnityEngine;
-namespace AibisDream.Config
+namespace AibisDream.Kit
{
public class ConfigUtil : SingletonBase
{
@@ -17,8 +16,11 @@ namespace AibisDream.Config
/// 用于单例模式
///
private ConfigUtil() {}
-
- public void InitConfig()
+
+ ///
+ /// 调用时初始化
+ ///
+ public override void OnSingletonInit()
{
InitBaseConfig();
InitCharacterConfig();
diff --git a/Assets/Scripts/Config/ConfigUtil.cs.meta b/Assets/Scripts/Framework/Config/ConfigUtil.cs.meta
similarity index 100%
rename from Assets/Scripts/Config/ConfigUtil.cs.meta
rename to Assets/Scripts/Framework/Config/ConfigUtil.cs.meta
diff --git a/Assets/Scripts/Framework/PoolKit.meta b/Assets/Scripts/Framework/PoolKit.meta
new file mode 100644
index 000000000..f2e4c8cd9
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8a7a8d52cd2e49844889aa5d550c741c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Factory.meta b/Assets/Scripts/Framework/PoolKit/Factory.meta
new file mode 100644
index 000000000..daad72f95
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e456fcaf06fef1a4099cceb5a2c31031
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs b/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs
new file mode 100644
index 000000000..446b7bfff
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs
@@ -0,0 +1,23 @@
+/*
+ * 自定义对象工厂:相关对象是 自己定义
+ */
+
+using System;
+
+namespace AibisDream.Kit
+{
+ public class CustomObjectFactory : IObjectFactory
+ {
+ protected readonly Func factoryMethod;
+
+ public CustomObjectFactory(Func vFactoryMethod)
+ {
+ factoryMethod = vFactoryMethod;
+ }
+
+ public T Create()
+ {
+ return factoryMethod();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs.meta b/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs.meta
new file mode 100644
index 000000000..3a20da315
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/CustomObjectFactory.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: b1dd302925fb4aafbf6f8f41c1928002
+timeCreated: 1726402106
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs b/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs
new file mode 100644
index 000000000..16cefd9cd
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs
@@ -0,0 +1,14 @@
+/*
+ * 默认对象工厂:相关对象是通过New 出来的
+ */
+
+namespace AibisDream.Kit
+{
+ public class DefaultObjectFactory : IObjectFactory where T : new()
+ {
+ public T Create()
+ {
+ return new T();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs.meta b/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs.meta
new file mode 100644
index 000000000..fdec9d267
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/DefaultObjectFactory.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 91f9bd47b23d4c138e50967ae5cba579
+timeCreated: 1726402317
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs b/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs
new file mode 100644
index 000000000..6152af4ab
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs
@@ -0,0 +1,15 @@
+/*
+ * 对象工厂接口
+ */
+
+namespace AibisDream.Kit
+{
+ public interface IObjectFactory
+ {
+ ///
+ /// 创建对象
+ ///
+ ///
+ T Create();
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs.meta b/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs.meta
new file mode 100644
index 000000000..d291da7ad
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Factory/IObjectFactory.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 68771bacd7dd4ebd80ed27a572546699
+timeCreated: 1726401919
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Pool.meta b/Assets/Scripts/Framework/PoolKit/Pool.meta
new file mode 100644
index 000000000..a3d5f7cce
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2afd2e11ccf1fb042a69e4031c68050b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs b/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs
new file mode 100644
index 000000000..e1a2d0d8b
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs
@@ -0,0 +1,22 @@
+/*
+ * 对象池接口
+ */
+
+namespace AibisDream.Kit
+{
+ public interface IPool
+ {
+ ///
+ /// 分配对象
+ ///
+ ///
+ T Allocate();
+
+ ///
+ /// 回收对象
+ ///
+ ///
+ ///
+ bool Recycle(T obj);
+ }
+}
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs.meta b/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs.meta
new file mode 100644
index 000000000..34f75419f
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPool.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eadd9e4584a70e046aa549a857ddad27
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs b/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs
new file mode 100644
index 000000000..fe20a7631
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs
@@ -0,0 +1,11 @@
+/*
+ * 对象池回收
+ */
+
+namespace AibisDream.Kit
+{
+ public interface IPoolType
+ {
+ void Recycle2Cache();
+ }
+}
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs.meta b/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs.meta
new file mode 100644
index 000000000..ea5e5110e
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPoolType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cf686abbf8da2534ca2f17103957e81f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs b/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs
new file mode 100644
index 000000000..c9c3d32c1
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs
@@ -0,0 +1,12 @@
+/*
+ * 对象池对象接口
+ */
+
+namespace AibisDream.Kit
+{
+ public interface IPoolable
+ {
+ void OnRecycled();
+ bool IsRecycled { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs.meta b/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs.meta
new file mode 100644
index 000000000..298544d8c
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/IPoolable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 65b1753af3e933c46bdfc117c8ef86a2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs b/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs
new file mode 100644
index 000000000..7a304d928
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs
@@ -0,0 +1,66 @@
+/*
+ * 基础对象池
+ */
+
+using System;
+using System.Collections.Generic;
+
+namespace AibisDream.Kit
+{
+ public abstract class Pool : IPool
+ {
+ #region ICountObserverable
+
+ ///
+ /// Gets the current count.
+ ///
+ /// The current count.
+ public int CurCount => mCacheStack.Count;
+
+ #endregion
+
+ protected IObjectFactory mFactory;
+
+ public void SetObjectFactory(IObjectFactory factory)
+ {
+ mFactory = factory;
+ }
+
+ public void SetFactoryMethod(Func factoryMethod)
+ {
+ mFactory = new CustomObjectFactory(factoryMethod);
+ }
+
+ ///
+ /// 存储相关数据的栈
+ ///
+ protected readonly Stack mCacheStack = new Stack();
+
+ public void Clear(Action onClearItem = null)
+ {
+ if (onClearItem != null)
+ {
+ foreach (var poolObject in mCacheStack)
+ {
+ onClearItem(poolObject);
+ }
+ }
+
+ mCacheStack.Clear();
+ }
+
+ ///
+ /// default is 5
+ ///
+ protected int mMaxCount = 12;
+
+ public virtual T Allocate()
+ {
+ return mCacheStack.Count == 0
+ ? mFactory.Create()
+ : mCacheStack.Pop();
+ }
+
+ public abstract bool Recycle(T obj);
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs.meta b/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs.meta
new file mode 100644
index 000000000..96481668e
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/Pool/Pool.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f98e7b24d3f13954e992bed9e8c0ebbe
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs b/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs
new file mode 100644
index 000000000..7606bf591
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs
@@ -0,0 +1,116 @@
+using UnityEngine;
+
+namespace AibisDream.Kit
+{
+ public class SafeObjectPool : Pool, ISingleton where T : IPoolable, new()
+ {
+ #region Singleton
+
+ void ISingleton.OnSingletonInit()
+ {
+ }
+
+ protected SafeObjectPool()
+ {
+ mFactory = new DefaultObjectFactory();
+ }
+
+ public static SafeObjectPool Instance => SingletonProp>.Instance;
+
+ public void Dispose()
+ {
+ SingletonProp>.Dispose();
+ }
+
+ #endregion
+
+ ///
+ /// Init the specified maxCount and initCount.
+ ///
+ /// Max Cache count.
+ /// Init Cache count.
+ public void Init(int maxCount, int initCount)
+ {
+ MaxCacheCount = maxCount;
+
+ if (maxCount > 0)
+ {
+ initCount = Mathf.Min(maxCount, initCount);
+ }
+
+ if (CurCount < initCount)
+ {
+ for (var i = CurCount; i < initCount; ++i)
+ {
+ Recycle(new T());
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the max cache count.
+ ///
+ /// The max cache count.
+ public int MaxCacheCount
+ {
+ get { return mMaxCount; }
+ set
+ {
+ mMaxCount = value;
+
+ if (mCacheStack != null)
+ {
+ if (mMaxCount > 0)
+ {
+ if (mMaxCount < mCacheStack.Count)
+ {
+ int removeCount = mCacheStack.Count - mMaxCount;
+ while (removeCount > 0)
+ {
+ mCacheStack.Pop();
+ --removeCount;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ ///
+ /// Allocate T instance.
+ ///
+ public override T Allocate()
+ {
+ var result = base.Allocate();
+ result.IsRecycled = false;
+ return result;
+ }
+
+ ///
+ /// Recycle the T instance
+ ///
+ /// T.
+ public override bool Recycle(T t)
+ {
+ if (t == null || t.IsRecycled)
+ {
+ return false;
+ }
+
+ if (mMaxCount > 0)
+ {
+ if (mCacheStack.Count >= mMaxCount)
+ {
+ t.OnRecycled();
+ return false;
+ }
+ }
+
+ t.IsRecycled = true;
+ t.OnRecycled();
+ mCacheStack.Push(t);
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs.meta b/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs.meta
new file mode 100644
index 000000000..281f9f6af
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/SafeObjectPool.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: c3733f06049b4b3c9b01c18e05ef3daa
+timeCreated: 1726408539
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs b/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs
new file mode 100644
index 000000000..06f9ad7fe
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs
@@ -0,0 +1,33 @@
+/*
+ * 普通对象池
+ */
+
+using System;
+
+namespace AibisDream.Kit
+{
+ public class SimpleObjectPool : Pool
+ {
+ readonly Action mResetMethod;
+
+ public SimpleObjectPool(Func factoryMethod, Action resetMethod = null, int initCount = 0)
+ {
+ mFactory = new CustomObjectFactory(factoryMethod);
+ mResetMethod = resetMethod;
+
+ for (var i = 0; i < initCount; i++)
+ {
+ mCacheStack.Push(mFactory.Create());
+ }
+ }
+
+ public override bool Recycle(T obj)
+ {
+ mResetMethod?.Invoke(obj);
+
+ mCacheStack.Push(obj);
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs.meta b/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs.meta
new file mode 100644
index 000000000..7c839423a
--- /dev/null
+++ b/Assets/Scripts/Framework/PoolKit/SimpleObjectPool.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 30dfcf9d6a8f44dd9bc6bb8052994e10
+timeCreated: 1726402817
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/SingletonKit.meta b/Assets/Scripts/Framework/SingletonKit.meta
new file mode 100644
index 000000000..d6a49e940
--- /dev/null
+++ b/Assets/Scripts/Framework/SingletonKit.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d7c2711ad71b0134cb18efabda647c41
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Framework/SingletonKit/ISingleton.cs b/Assets/Scripts/Framework/SingletonKit/ISingleton.cs
new file mode 100644
index 000000000..3a79de89b
--- /dev/null
+++ b/Assets/Scripts/Framework/SingletonKit/ISingleton.cs
@@ -0,0 +1,17 @@
+/*
+ * 单例接口
+ */
+
+namespace AibisDream.Kit
+{
+ ///
+ /// 单例接口
+ ///
+ public interface ISingleton
+ {
+ ///
+ /// 单例初始化(继承当前接口的类都需要实现该方法)
+ ///
+ void OnSingletonInit();
+ }
+}
diff --git a/Assets/Scripts/Framework/SingletonKit/ISingleton.cs.meta b/Assets/Scripts/Framework/SingletonKit/ISingleton.cs.meta
new file mode 100644
index 000000000..df8765e3f
--- /dev/null
+++ b/Assets/Scripts/Framework/SingletonKit/ISingleton.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a230db405379d3a428a5cba018978da9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Utility/Singleton.cs b/Assets/Scripts/Framework/SingletonKit/Singleton.cs
similarity index 71%
rename from Assets/Scripts/Utility/Singleton.cs
rename to Assets/Scripts/Framework/SingletonKit/Singleton.cs
index cfc150bb0..a2b8166a5 100644
--- a/Assets/Scripts/Utility/Singleton.cs
+++ b/Assets/Scripts/Framework/SingletonKit/Singleton.cs
@@ -1,8 +1,8 @@
using UnityEngine;
-namespace AibisDream
+namespace AibisDream.Kit
{
- public class Singleton : MonoBehaviour where T : Singleton
+ public abstract class Singleton : MonoBehaviour, ISingleton where T : Singleton
{
public static T Instance { get; private set; }
@@ -15,9 +15,14 @@ namespace AibisDream
else
{
Instance = (T)this;
+ OnSingletonInit();
}
}
+ public virtual void OnSingletonInit()
+ {
+ }
+
public static bool IsInitialized => Instance != null;
protected virtual void OnDestroy()
diff --git a/Assets/Scripts/Utility/Singleton.cs.meta b/Assets/Scripts/Framework/SingletonKit/Singleton.cs.meta
similarity index 100%
rename from Assets/Scripts/Utility/Singleton.cs.meta
rename to Assets/Scripts/Framework/SingletonKit/Singleton.cs.meta
diff --git a/Assets/Scripts/Utility/SingletonBase.cs b/Assets/Scripts/Framework/SingletonKit/SingletonBase.cs
similarity index 79%
rename from Assets/Scripts/Utility/SingletonBase.cs
rename to Assets/Scripts/Framework/SingletonKit/SingletonBase.cs
index fd02715af..636586a24 100644
--- a/Assets/Scripts/Utility/SingletonBase.cs
+++ b/Assets/Scripts/Framework/SingletonKit/SingletonBase.cs
@@ -1,9 +1,9 @@
using System;
using System.Reflection;
-namespace AibisDream.Utility
+namespace AibisDream.Kit
{
- public abstract class SingletonBase where T : SingletonBase
+ public abstract class SingletonBase : ISingleton where T : SingletonBase
{
private static T _instance;
@@ -20,9 +20,12 @@ namespace AibisDream.Utility
throw new Exception("Non-public ctor() not found!");
// 调用构造方法
_instance = ctor.Invoke(null) as T;
+ _instance?.OnSingletonInit();
return _instance;
}
}
+
+ public abstract void OnSingletonInit();
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/Utility/SingletonBase.cs.meta b/Assets/Scripts/Framework/SingletonKit/SingletonBase.cs.meta
similarity index 100%
rename from Assets/Scripts/Utility/SingletonBase.cs.meta
rename to Assets/Scripts/Framework/SingletonKit/SingletonBase.cs.meta
diff --git a/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs b/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs
new file mode 100644
index 000000000..92d7fed7d
--- /dev/null
+++ b/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Reflection;
+
+namespace AibisDream.Kit
+{
+ public class SingletonProp where T : class, ISingleton
+ {
+ ///
+ /// 静态实例
+ ///
+ private static T _instance;
+
+ ///
+ /// 标签锁
+ ///
+ private static readonly object _lock = new();
+
+ public static T Instance
+ {
+ get
+ {
+ lock (_lock)
+ {
+ if (_instance == null)
+ {
+ // 先获取所有非public的构造方法
+ var ctors = typeof(T).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic);
+ // 从ctors中获取无参的构造方法
+ var ctor = Array.Find(ctors, c => c.GetParameters().Length == 0);
+ if (ctor == null)
+ throw new Exception("Non-public ctor() not found!");
+ // 调用构造方法
+ _instance = ctor.Invoke(null) as T;
+ _instance?.OnSingletonInit();
+
+ return _instance;
+ }
+ }
+
+ return _instance;
+ }
+ }
+
+ ///
+ /// 资源释放
+ ///
+ public static void Dispose()
+ {
+ _instance = null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs.meta b/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs.meta
new file mode 100644
index 000000000..bdee2e05e
--- /dev/null
+++ b/Assets/Scripts/Framework/SingletonKit/SingletonProp.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 6c24ee94a9ee48aca0977131b6d772e0
+timeCreated: 1726411869
\ No newline at end of file
diff --git a/Assets/Scripts/Game Loop/GameLoopManager.cs b/Assets/Scripts/Game Loop/GameLoopManager.cs
index cf58b5dec..508cbe664 100644
--- a/Assets/Scripts/Game Loop/GameLoopManager.cs
+++ b/Assets/Scripts/Game Loop/GameLoopManager.cs
@@ -1,5 +1,5 @@
using System.Collections;
-using AibisDream.Config;
+using AibisDream.Kit;
using UnityEngine;
using Yarn.Unity;
@@ -24,8 +24,6 @@ namespace AibisDream
public void Start()
{
- ConfigUtil.Instance.InitConfig();
-
if (runMode == RunMode.Test)
{
MainUIController.Instance.TVFadeOut(1);
diff --git a/Assets/Scripts/Game Loop/SceneLoader.cs b/Assets/Scripts/Game Loop/SceneLoader.cs
index ff3faf930..a2fb0cff9 100644
--- a/Assets/Scripts/Game Loop/SceneLoader.cs
+++ b/Assets/Scripts/Game Loop/SceneLoader.cs
@@ -1,4 +1,5 @@
using System.Collections;
+using AibisDream.Kit;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;
diff --git a/Assets/Scripts/MainScene/MainSceneController.cs b/Assets/Scripts/MainScene/MainSceneController.cs
index f36120d2b..4422dd00d 100644
--- a/Assets/Scripts/MainScene/MainSceneController.cs
+++ b/Assets/Scripts/MainScene/MainSceneController.cs
@@ -1,4 +1,5 @@
using System.Collections;
+using AibisDream.Kit;
using UnityEngine;
namespace AibisDream
diff --git a/Assets/Scripts/UI/DialogUI/DialogBoxBase.cs b/Assets/Scripts/UI/DialogUI/DialogBoxBase.cs
index 3a75d42da..72cb16554 100644
--- a/Assets/Scripts/UI/DialogUI/DialogBoxBase.cs
+++ b/Assets/Scripts/UI/DialogUI/DialogBoxBase.cs
@@ -1,5 +1,5 @@
using System;
-using AibisDream.Config;
+using AibisDream.Kit;
using AibisDream.Utility;
using Febucci.UI;
using TMPro;
@@ -83,8 +83,9 @@ namespace AibisDream
/// 对话内容
/// 角色内容
/// 下一步
+ /// 文字展示结束后触发
/// 是否自动跳过,默认为false
- public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
+ public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed ,bool isAutoSkip = false)
{
gameObject.SetActive(true);
// 没有dialogText说明不能显示对话,直接跳过
@@ -107,6 +108,7 @@ namespace AibisDream
// 自动跳过的回调很难独立Remove,只能全部清空再注册,下策
dialogText.onTextShowed.RemoveAllListeners();
dialogText.onTextShowed.AddListener(() => nextArray.gameObject.SetActive(true));
+ dialogText.onTextShowed.AddListener(() => onTextShowed?.Invoke());
// 执行自动跳过结局
if (isAutoSkip)
diff --git a/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs b/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs
index 9dfb32925..b7dc60b86 100644
--- a/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs
+++ b/Assets/Scripts/UI/DialogUI/DialogBubbleViewer.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-using AibisDream.Config;
+using AibisDream.Kit;
using UnityEngine;
using Yarn.Unity;
@@ -11,15 +11,17 @@ namespace AibisDream
private const string PlayerBubble = "Player Bubble";
private const string ActorBubble = "Actor Bubble";
private const string NormalBox = "Normal Box";
-
+
private IDialogView _normalBox;
private IDialogView _playerBubble;
+
private IDialogView _actorBubble;
+
// 应该会有自定义位置的泡泡,但目前还没想好怎么做
private Dictionary _customBubblePool = new();
private List _dialogViews;
-
+
private IDialogView _currentView;
private void Awake()
@@ -32,12 +34,13 @@ namespace AibisDream
_normalBox = transform.Find(NormalBox).GetComponent();
_playerBubble = transform.Find(PlayerBubble).GetComponent();
_actorBubble = transform.Find(ActorBubble).GetComponent();
-
+
_dialogViews = new List { _normalBox, _playerBubble, _actorBubble };
_dialogViews.ForEach(item => item.HideDialog());
}
-
- public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
+
+ public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed,
+ bool isAutoSkip = false)
{
gameObject.SetActive(true);
// 根据角色信息气泡
@@ -45,7 +48,7 @@ namespace AibisDream
// 处理其他泡泡
ProcessOtherBox();
// 显示对话
- _currentView.ShowLine(dialogLine, character, nextStep, isAutoSkip);
+ _currentView.ShowLine(dialogLine, character, nextStep, onTextShowed, isAutoSkip);
}
public void ShowOptions(DialogueOption[] dialogueOptions, Action onOptionSelected)
@@ -55,7 +58,7 @@ namespace AibisDream
// 目前只有正常Box可以展示选项
// 处理其他泡泡
ProcessOtherBox();
-
+
// 展示选项
_normalBox.ShowOptions(dialogueOptions, onOptionSelected);
}
@@ -97,5 +100,4 @@ namespace AibisDream
}
}
}
-}
-
+}
\ No newline at end of file
diff --git a/Assets/Scripts/UI/DialogUI/DialogCanvasManager.cs b/Assets/Scripts/UI/DialogUI/DialogCanvasManager.cs
index 1377aab6a..6ef2dd703 100644
--- a/Assets/Scripts/UI/DialogUI/DialogCanvasManager.cs
+++ b/Assets/Scripts/UI/DialogUI/DialogCanvasManager.cs
@@ -1,4 +1,5 @@
using System;
+using AibisDream.Kit;
using UnityEngine;
using UnityEngine.UI;
@@ -17,10 +18,9 @@ namespace AibisDream
private IDialogView _curView;
private GameObject _quickTalkButton;
-
- protected override void Awake()
+
+ public override void OnSingletonInit()
{
- base.Awake();
InitDialogViews();
InitQuickTalkButton();
// 默认为旧Box
diff --git a/Assets/Scripts/UI/DialogUI/DialogUiViewer.cs b/Assets/Scripts/UI/DialogUI/DialogUiViewer.cs
index bc99273a4..9584aea9b 100644
--- a/Assets/Scripts/UI/DialogUI/DialogUiViewer.cs
+++ b/Assets/Scripts/UI/DialogUI/DialogUiViewer.cs
@@ -1,5 +1,6 @@
using Febucci.UI;
using System;
+using AibisDream.Kit;
using AibisDream.Utility;
using TMPro;
using UnityEngine;
@@ -35,9 +36,8 @@ namespace AibisDream
private bool _skipLineDelay;
- protected override void Awake()
+ public override void OnSingletonInit()
{
- base.Awake();
// 获取预制体
choiceButtonPrefab = Resources.Load("Prefabs/UI/Choice Button");
// 获取子物体
diff --git a/Assets/Scripts/UI/DialogUI/IDialogView.cs b/Assets/Scripts/UI/DialogUI/IDialogView.cs
index 95c997c6a..1e4b2ac84 100644
--- a/Assets/Scripts/UI/DialogUI/IDialogView.cs
+++ b/Assets/Scripts/UI/DialogUI/IDialogView.cs
@@ -1,18 +1,18 @@
using System;
-using AibisDream.Config;
+using AibisDream.Kit;
using Yarn.Unity;
namespace AibisDream
{
public interface IDialogView
{
- public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false);
-
+ public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
+ bool isAutoSkip = false);
+
public void ShowOptions(DialogueOption[] dialogueOptions, Action onOptionSelected);
public void HideDialog();
public bool TrySkipLine();
}
-}
-
+}
\ No newline at end of file
diff --git a/Assets/Scripts/UI/MainUIViewer.cs b/Assets/Scripts/UI/MainUIViewer.cs
index ac69625f3..52cdb68b0 100644
--- a/Assets/Scripts/UI/MainUIViewer.cs
+++ b/Assets/Scripts/UI/MainUIViewer.cs
@@ -1,4 +1,5 @@
using System.Collections;
+using AibisDream.Kit;
using UnityEngine;
using UnityEngine.UI;
@@ -20,13 +21,12 @@ namespace AibisDream
private FadeImage _objImage;
#endregion
-
- protected override void Awake()
+
+ public override void OnSingletonInit()
{
- base.Awake();
InitChildObj();
}
-
+
#region 基本淡入淡出
public void FadeIn(float duration)
diff --git a/Assets/Scripts/UI/StartMenuViewer.cs b/Assets/Scripts/UI/StartMenuViewer.cs
index ac651cb68..dd46d688c 100644
--- a/Assets/Scripts/UI/StartMenuViewer.cs
+++ b/Assets/Scripts/UI/StartMenuViewer.cs
@@ -1,6 +1,4 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
+using AibisDream.Kit;
namespace AibisDream
{
diff --git a/Assets/Scripts/Utility/YarnUtil.cs b/Assets/Scripts/Utility/YarnUtil.cs
index d6c17ccb2..b16e3ab18 100644
--- a/Assets/Scripts/Utility/YarnUtil.cs
+++ b/Assets/Scripts/Utility/YarnUtil.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using AibisDream.Config;
+using AibisDream.Kit;
using Yarn;
using Yarn.Markup;
using Yarn.Unity;
diff --git a/Assets/Settings/Main Mixer.mixer b/Assets/Settings/Main Mixer.mixer
new file mode 100644
index 000000000..435473838
--- /dev/null
+++ b/Assets/Settings/Main Mixer.mixer
@@ -0,0 +1,279 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!243 &-6773993072664640036
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Memery
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: 165865fd7a8064545ba2d0093d307fe0
+ m_Children: []
+ m_Volume: 870445f6867303e43a8d5b312a6bdeb9
+ m_Pitch: f497edbcaeaae14478659019be9d914c
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: 190805140530363889}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!243 &-4767431408014039957
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Amb2
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: 8e51f489befeaf44fb45969c28e61fa6
+ m_Children: []
+ m_Volume: 99373ebf84fee854c9532604faa96fc7
+ m_Pitch: 36b3631d5eba2304bada4c467fb982b4
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: -2476848365125548349}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!244 &-3087767764466786958
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: 043f96faf171b5946ac6eedaa56e2297
+ m_EffectName: Attenuation
+ m_MixLevel: 0d67c1e982760b84a8300c9eeba0677c
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!244 &-2476848365125548349
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: a068c3eacfd11c74e9cf79d452f09d99
+ m_EffectName: Attenuation
+ m_MixLevel: 149e8876472bac042b683518ce1f687d
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!243 &-2297450186869358485
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Voice
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: 69f606423af8261439c25d6668fca50f
+ m_Children: []
+ m_Volume: 085b8a687aa362c46a94e1fe0ee30d76
+ m_Pitch: be48600ee044d7843b9a9be6007747ff
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: 5517921842288305647}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!243 &-1154322574682727772
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Interaction
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: 0d7ba4f74a7f6c649866c7678a769d9d
+ m_Children: []
+ m_Volume: 40af4fa954019f545a5f6e51bc960b69
+ m_Pitch: 538ac5b0ac48c244b8fc8d34975d513c
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: 6947884131867591565}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!241 &24100000
+AudioMixerController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Main Mixer
+ m_OutputGroup: {fileID: 0}
+ m_MasterGroup: {fileID: 24300002}
+ m_Snapshots:
+ - {fileID: 24500006}
+ m_StartSnapshot: {fileID: 24500006}
+ m_SuspendThreshold: -80
+ m_EnableSuspend: 1
+ m_UpdateMode: 0
+ m_ExposedParameters: []
+ m_AudioMixerGroupViews:
+ - guids:
+ - d379c99ecfccd1d4ba005aa9fcb7d531
+ - bd8e088216aa5484280055987b97478d
+ - 0d7ba4f74a7f6c649866c7678a769d9d
+ - 69f606423af8261439c25d6668fca50f
+ - 165865fd7a8064545ba2d0093d307fe0
+ - 11a4f8e0dff165d4286eb7bac8d09d7a
+ - 8e51f489befeaf44fb45969c28e61fa6
+ name: View
+ m_CurrentViewIndex: 0
+ m_TargetSnapshot: {fileID: 24500006}
+--- !u!243 &24300002
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Master
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: d379c99ecfccd1d4ba005aa9fcb7d531
+ m_Children:
+ - {fileID: 8866379113506573767}
+ - {fileID: -1154322574682727772}
+ - {fileID: -2297450186869358485}
+ - {fileID: -6773993072664640036}
+ - {fileID: 1773163451604355202}
+ - {fileID: -4767431408014039957}
+ m_Volume: 253e6efbbc79f314a8e098aefef4c9fc
+ m_Pitch: 644f600ef4d0d694a89ae33abbcc0fe4
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: 24400004}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!244 &24400004
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: 1537c4ecfb73a8444b1fe3775d246b67
+ m_EffectName: Attenuation
+ m_MixLevel: d031d67ce6025f543be601109eed5841
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!245 &24500006
+AudioMixerSnapshotController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Snapshot
+ m_AudioMixer: {fileID: 24100000}
+ m_SnapshotID: 3ad1d787307658a4198746e8ac0249d4
+ m_FloatValues:
+ 085b8a687aa362c46a94e1fe0ee30d76: -0.025777228
+ m_TransitionOverrides: {}
+--- !u!244 &190805140530363889
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: 14b68ae03e01fdd4bb249628cdccbec8
+ m_EffectName: Attenuation
+ m_MixLevel: 071fd38ff1b7fe04798d6bc12b5de963
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!243 &1773163451604355202
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Amb1
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: 11a4f8e0dff165d4286eb7bac8d09d7a
+ m_Children: []
+ m_Volume: 4544ecf23f3594e4f8175fe7aef2aa2e
+ m_Pitch: ef1f302dcdd87fa4d827d452ac89bceb
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: 1852471015961055103}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
+--- !u!244 &1852471015961055103
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: ec128c0b5cd78784fa206b3abc79e06d
+ m_EffectName: Attenuation
+ m_MixLevel: 29e2408aa2feb884ca7895fcfd1bfc65
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!244 &5517921842288305647
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: fa7272190aa144940bc6c7a61f1df72b
+ m_EffectName: Attenuation
+ m_MixLevel: 92933f4546cc1e145aa24bb304eab0cb
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!244 &6947884131867591565
+AudioMixerEffectController:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_EffectID: 72a6914944042184593dd44114ac35e2
+ m_EffectName: Attenuation
+ m_MixLevel: 7cdd1dd5e2744dd41a52cd67cdc8bfbe
+ m_Parameters: []
+ m_SendTarget: {fileID: 0}
+ m_EnableWetMix: 0
+ m_Bypass: 0
+--- !u!243 &8866379113506573767
+AudioMixerGroupController:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Loop
+ m_AudioMixer: {fileID: 24100000}
+ m_GroupID: bd8e088216aa5484280055987b97478d
+ m_Children: []
+ m_Volume: 2c39503a310991949a29d1e9af882cf1
+ m_Pitch: b8ddbb8d430eb7d448c857604824f835
+ m_Send: 00000000000000000000000000000000
+ m_Effects:
+ - {fileID: -3087767764466786958}
+ m_UserColorIndex: 0
+ m_Mute: 0
+ m_Solo: 0
+ m_BypassEffects: 0
diff --git a/Assets/Settings/Main Mixer.mixer.meta b/Assets/Settings/Main Mixer.mixer.meta
new file mode 100644
index 000000000..bc36110d0
--- /dev/null
+++ b/Assets/Settings/Main Mixer.mixer.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b14347481450a234a852407119bfecb4
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 24100000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Config/character.csv b/Assets/StreamingAssets/Config/character.csv
index 22f3c699c..a932745eb 100644
--- a/Assets/StreamingAssets/Config/character.csv
+++ b/Assets/StreamingAssets/Config/character.csv
@@ -1,10 +1,10 @@
通过key索引配置,中文名,人物角色(Player/MainActor/Aside),名称显示时的颜色,头像Pic路径,语音资源路径
Key,Cn,Role,NameColor,HeadPicPath,VoicePath
-peipei,佩佩,MainActor,#00FFFF,peipei_head,peipei_voice
-me,我,Player,,me_head,me_voice
-peipei_novoice,胆怯女声,Aside,#00FFFF,,
-yingli_novoice,严厉女声,Aside,#FFCC00,,
+peipei,佩佩,MainActor,#00FFFF,peipei_head,voice_peipei
+me,我,Player,,me_head,voice_me
+peipei_novoice,胆怯女声,Aside,#00FFFF,,voice_peipei
+yingli_novoice,严厉女声,Aside,#FFCC00,,voice_yingli
tutorial,教学,Aside,,,
docter,儿科医生,Aside,#FFCC00,,
-peipei_child,童年佩佩,Aside,#00FFFF,,
+peipei_child,童年佩佩,Aside,#00FFFF,,voice_peipei
unknown,???,Aside,#FFCC00,,