218 Commits

Author SHA1 Message Date
99015f5838 ci: Update Cryville.Audio (Amend) 2025-06-21 02:23:49 +08:00
cdaf0dfd2f fix: Fix update checker by adding user agent 2025-06-21 02:23:34 +08:00
38421b7a53 refactor: Use .NET HTTP client in favor of the custom client 2025-06-21 02:22:50 +08:00
e0362bbb58 build: Update plugins 2025-06-21 01:39:59 +08:00
a02885704d ci: Update Cryville.Audio 2025-06-21 01:39:47 +08:00
0a223af698 build: Update HybridCLR 2025-06-21 01:24:27 +08:00
283783954f refactor: Update Unity to 2022.3.62 2025-06-21 01:22:02 +08:00
d71bf7d4a5 Change affix position for config tabs. 2024-02-16 19:18:27 +08:00
4274bfa1b7 Update project version. 2024-02-16 18:28:21 +08:00
b3fe4de0d4 Use reference count in action manager. 2024-02-16 18:25:57 +08:00
e9e6d7002a Pull down IResourceDestination. 2024-02-16 18:25:03 +08:00
662cbf0827 Pull up error handling from action to browser. 2023-12-25 15:06:16 +08:00
9bfa7f2048 Fix error while destroying a failing ruleset config browser. 2023-12-25 15:04:46 +08:00
45d80522eb Modify message for missing ruleset. 2023-12-25 15:03:38 +08:00
77f92f9294 Fix dialog not released on loading error in chart player. 2023-12-25 15:02:39 +08:00
5241490590 Unlistens to action changes on resource browser master destroyed. 2023-12-25 14:37:27 +08:00
8bb2a01c8e Invalidates property values on ruleset config enable. 2023-12-25 14:27:18 +08:00
85bbe43827 Implement use skin action. 2023-12-25 14:26:27 +08:00
a532a9f4c1 Force value changed and invalidate implementation in property adapter. 2023-12-25 14:21:37 +08:00
c66b7da63b Add CanInvoke method to IResourceAction. 2023-12-20 00:06:57 +08:00
e1bb874943 Add IResourceMeta constraint on resource action. 2023-12-19 18:26:42 +08:00
365a8992cd Add chart field to virtual player strategy. 2023-12-19 16:49:26 +08:00
cd3aae7201 Code cleanup. 2023-12-19 16:48:27 +08:00
aa84fb8544 Implement legacy skin resource browser. 2023-12-19 16:48:13 +08:00
4dd4c5f20d Pull down LegacyChartResourceManager. 2023-12-19 16:47:21 +08:00
30b3114bc1 Fix error on loading invalid resource. (2) 2023-12-19 16:45:18 +08:00
58be497903 Fix error on loading invalid resource. 2023-12-19 16:44:44 +08:00
50879a1f3f Fix error on attempt to reload actions when the game is shutting down. 2023-12-19 16:40:59 +08:00
55dd38fb2c Prevents multiple initialization of extension manager. 2023-12-19 16:06:58 +08:00
b7f5dbc4da Pull up IChartDetail. 2023-12-19 15:23:40 +08:00
81d458f7de Fix the foreground icon not tinted with the button. 2023-12-19 14:55:45 +08:00
58091ad534 Code cleanup. 2023-12-19 14:31:08 +08:00
6783d39571 Add default font for Korean on Windows. 2023-12-19 14:30:36 +08:00
e2c8c92279 Fix URL opener not working on Windows build. 2023-12-03 01:05:32 +08:00
cbe2e1d9af Update project version. 2023-12-02 17:34:50 +08:00
b0efd6b6b4 Remove popup for duplicate resources. 2023-12-02 17:33:07 +08:00
290f02cfbc Fix song path not escaped while loading. 2023-12-02 17:32:25 +08:00
42c3ed8ca8 Update Cryville.Input.Unity.Builtin. 2023-12-02 17:31:07 +08:00
b1b9dbdb77 Update Cryville.Culture. 2023-12-02 17:28:00 +08:00
c27647bf01 TMP: Fix caret height not correct with empty content. 2023-12-02 17:27:42 +08:00
1fec4d363e Replace placeholder image. 2023-12-02 17:02:24 +08:00
8ad7d86f94 Remove legacy assets. 2023-12-02 17:01:50 +08:00
df3f7203d3 Improve the error message on judge not found. 2023-12-02 00:49:07 +08:00
00d47cde0c Fix the names of missing textures not correctly logged. 2023-12-02 00:32:42 +08:00
7298645850 Fix vector indicators disappearing on initial zero delta in input dialog entry. 2023-12-02 00:31:55 +08:00
6d714c972b Add hung color to input dialog entry. 2023-12-02 00:30:55 +08:00
446724f9ca Move preserved types to link.xml. 2023-12-02 00:29:23 +08:00
6e01b255a6 Fix error while getting drives in file system resource manager on Windows. 2023-12-02 00:28:47 +08:00
01b162883d Prevents duplicate ruleset config tabs. 2023-12-02 00:28:07 +08:00
c4e15fbbfd Reloads files on resource imported to legacy resource browser. 2023-12-01 16:53:39 +08:00
6f4dfad53e Displays directory not found error in file system resource manager. 2023-12-01 16:52:58 +08:00
5c38245e23 Implement the new input config. 2023-12-01 16:52:21 +08:00
4d05d0d135 Fix resource browser initialization. (2) 2023-12-01 11:45:15 +08:00
8cf6430181 Fix resource browser initialization. 2023-12-01 00:35:43 +08:00
f247be0177 Adjust padding of the text in tab. 2023-11-30 21:28:03 +08:00
f9916cbce7 Implement the new string property value panel. 2023-11-30 21:27:30 +08:00
c55a5d7ddd Reloads files on legacy resource browser activated. 2023-11-30 21:26:13 +08:00
091d6307d1 Implement ruleset config browser. 2023-11-30 21:25:38 +08:00
05db2cc32e Fix the highlight part of the slider disappearing after an abnormal range is assigned. 2023-11-30 17:03:05 +08:00
5d884c1c7b Fix tab not expanded correctly while inner elements are resizing. 2023-11-30 17:01:43 +08:00
ea3ca7806c Disables number editing in mapped property mode. 2023-11-30 17:00:16 +08:00
beeca3b5f9 Add read-only tab icon for pathed resource browser. 2023-11-30 15:15:32 +08:00
4051ea8874 Update save icon. 2023-11-30 15:13:47 +08:00
42745ead11 Add icons to toolbar buttons. 2023-11-30 15:12:58 +08:00
d8048b1d89 Implement closable tab. 2023-11-30 15:10:44 +08:00
048a9f54fb Reloads actions on actions changed. 2023-11-30 15:08:00 +08:00
59339d5bc6 Fix singleton pattern. 2023-11-30 15:04:36 +08:00
7f8c0b5eec Displays directory access error in file system resource manager. 2023-11-30 01:13:43 +08:00
2fbd2fb466 Checks validity of imported extension. 2023-11-30 01:11:57 +08:00
de1e9f9019 Code cleanup. 2023-11-29 22:25:21 +08:00
d74db533dc Implement file system resource manager. (Amend) 2023-11-29 22:24:47 +08:00
83ea6f5a0c Implement file system resource manager. 2023-11-29 22:24:33 +08:00
bb0ca985cd Fix import resource action registered for read-only browsers. 2023-11-29 22:24:06 +08:00
8af5e772d6 Implement resource searching and directory items. 2023-11-29 22:22:57 +08:00
aebce25f3b Move pathed resource browser into prefab. 2023-11-29 22:15:38 +08:00
b39428aa39 Excludes import action in self browser. 2023-11-29 22:07:23 +08:00
700af29e43 Couple browser item to resource browser. 2023-11-29 22:04:04 +08:00
0f13d2d5fd Add support for directory items. 2023-11-29 21:57:58 +08:00
820aaeff85 Includes actions for base types. 2023-11-29 21:55:06 +08:00
ed6ae7ad8a Optimize performance and GC for string parsing in PDT. 2023-11-29 14:51:49 +08:00
5ef6e2b4a3 Refactor representation of character category in PDT. 2023-11-29 14:51:14 +08:00
6d0975b0a1 Code cleanup. 2023-11-29 13:53:55 +08:00
111c500f3b Add type constraints for resource managers. Generalize detail panel. 2023-11-29 13:52:34 +08:00
a471272c52 Remove obsolete methods for importing. 2023-11-29 13:47:49 +08:00
190c3ef680 Rename resource meta interface. 2023-11-29 13:44:25 +08:00
e210837329 Add sub action button. 2023-11-29 13:21:09 +08:00
e339ec3e4c Pull up singleton behaviour. 2023-11-29 13:12:19 +08:00
522699152b Implement action bar. 2023-11-23 18:03:55 +08:00
e9d0f4ce1a Clean up logic for popup. 2023-11-23 17:08:46 +08:00
155ce0bb22 Remove legacy call helper. 2023-11-23 13:46:00 +08:00
cbe94e6308 Add browser item meta interface. 2023-11-23 13:42:02 +08:00
3064925cd2 Update menu scene. 2023-11-23 00:58:49 +08:00
7af998db15 Use TextMesh Pro in dialog. 2023-11-23 00:58:15 +08:00
1a084e6bfb Implement resource deletion. 2023-11-23 00:57:22 +08:00
5e2fae0f14 Remove legacy file dialog. 2023-11-23 00:56:44 +08:00
58017e1216 Add path text and write tools in pathed resource browser. 2023-11-23 00:54:47 +08:00
7fa8e09c10 Clears detail panel on resource item changed. 2023-11-23 00:53:28 +08:00
8f70b0075f Use actions in resource browser. 2023-11-23 00:52:36 +08:00
54f75781f3 Restructure resource browsers. 2023-11-23 00:50:37 +08:00
d7a38416aa Implement action manager. 2023-11-23 00:03:15 +08:00
ed496859cb Add resource action. Implement play chart and import resource action. 2023-11-23 00:02:55 +08:00
33c0826f3b Restructure resource managers. Add remove resource interface and directory changed event. 2023-11-23 00:01:29 +08:00
2d7a204a30 Transfer detail panel to resource browser. 2023-11-22 00:30:56 +08:00
92fb34cfa8 Code cleanup. 2023-11-21 18:03:34 +08:00
ad625e3e35 Disables text field when it is not active in settings. 2023-11-21 11:26:12 +08:00
342e216372 Remove sensitive system info from log. 2023-11-20 23:50:17 +08:00
88d198f408 Fix resource URI for Android. 2023-11-20 20:24:53 +08:00
ec8487a4c6 Disables file watcher during gameplay. 2023-11-20 20:24:23 +08:00
4f12e4816f Update Cryville.Input. 2023-11-20 20:23:33 +08:00
30e9f091d7 Fix conditional compilation in UI layout components. 2023-11-20 20:22:58 +08:00
c2e94afc1c Update Cryville.Common.Logging. 2023-11-20 20:21:21 +08:00
e2c58c708f Remove console. 2023-11-20 20:15:52 +08:00
c52bf734d3 Watches file changes in legacy resource manager in favor of manual refresh. 2023-11-13 17:39:45 +08:00
ca60681de7 Implement enumerator for legacy resource manager. 2023-11-13 17:37:17 +08:00
8f3c38e273 Add more debug logs about environment. 2023-11-13 00:39:30 +08:00
119b87f3df Fix the two names in the item tile flipped. 2023-11-13 00:38:33 +08:00
2778725b91 Fix error on invalid resource item. 2023-11-13 00:36:30 +08:00
4ca5809597 Code cleanup. 2023-11-13 00:28:26 +08:00
0cdd6e569e Obsolete the old file dialog. 2023-11-13 00:27:20 +08:00
8c11be48cf Adapt resource manager to URI and list pattern. 2023-11-13 00:26:18 +08:00
9fcf6f3379 Remove ResourceItemMeta. 2023-11-13 00:23:08 +08:00
b45cf9cba7 Fix incorrect layout width for tabs on enable. 2023-11-12 01:05:06 +08:00
28234d9587 Replace menu scene in build settings. 2023-11-11 11:57:09 +08:00
1803e1dee7 Implement the new settings browser. 2023-11-11 11:56:36 +08:00
166478e4bb Implement browser tabs. 2023-11-11 11:54:52 +08:00
c05b771425 Add description property to property adapter. 2023-11-11 11:42:05 +08:00
9db2ded366 Rename render distance settings. 2023-11-11 11:40:48 +08:00
9aed79f599 Rearrange the categories of the settings. 2023-11-11 11:39:53 +08:00
221887e447 Code cleanup. 2023-11-10 15:01:44 +08:00
36013d4e47 Update Cryville.Common.Reflection. 2023-11-10 15:00:38 +08:00
cf8dda1ea2 Add animations for browser item tile. 2023-11-10 15:00:14 +08:00
0f4aec4355 Implement drafted new UI. 2023-11-10 14:59:28 +08:00
ddf738ee27 Pull down IPathedResourceManager. Reconstruct resource browser. 2023-11-10 14:57:52 +08:00
bd834cff4a Add tweener and state tweener. 2023-11-10 14:51:14 +08:00
adf5019e2a Add null check for some UI components. 2023-11-10 14:50:15 +08:00
a19a3d9b81 Remove use of animator in UI. 2023-11-10 14:48:17 +08:00
b50f771d6e Clean up hardcoded UI paths. 2023-11-10 14:45:23 +08:00
8089e724f9 Add single layout group. 2023-11-10 14:35:02 +08:00
18f9fbea60 Add safe area. 2023-11-10 14:34:47 +08:00
6ea487ff13 Import new UI assets. 2023-11-10 14:34:01 +08:00
a83b16c829 Remove UIElements package. 2023-11-10 14:33:07 +08:00
b48bd7b8ba Code cleanup. 2023-11-10 14:32:28 +08:00
b56722b2d1 Add vertical mode for ImageSliced3. 2023-11-07 16:17:41 +08:00
5854801a53 Fix UI pattern for AspectRatioLayoutElement. 2023-11-07 15:53:16 +08:00
668f46d260 Prevents matching the fallback script twice. 2023-11-03 00:26:37 +08:00
b672889008 Update fallback script. 2023-11-03 00:25:49 +08:00
08a12097a4 Forces one font instance per full name. 2023-11-03 00:24:25 +08:00
7535ce04f5 Update docs. 2023-11-02 12:16:55 +08:00
bede668e73 Update UnsafeIL. 2023-11-02 12:16:48 +08:00
c2c28518ba Exclude Discord Game SDK from Android builds. 2023-11-02 12:16:33 +08:00
bfa1423f64 Import Cryville.Culture in favor of ScriptUtils. 2023-11-02 12:15:38 +08:00
395c094890 Discard unused docs. 2023-11-02 12:11:41 +08:00
a284edd130 Add debug logs about environment and fonts. 2023-11-01 01:02:55 +08:00
b57959b4bf Update Cryville.Audio. 2023-11-01 01:01:13 +08:00
724cb10bc1 Import Cryville.Interop.Java. 2023-11-01 00:59:09 +08:00
97e759f57d Adjust the progress report from prehandler. 2023-10-08 01:00:12 +08:00
3ce8ad72ed Add dialogs for audio engine initialization error. 2023-10-08 00:58:43 +08:00
c23d79e3f5 Emits a warning on text frame not found. 2023-10-08 00:53:12 +08:00
71294db3c1 Optimize GC and performance for MonoPInvokeCallback. 2023-09-25 17:09:27 +08:00
825818679c Rearrange platform specific plugins. 2023-09-25 10:52:16 +08:00
84acb2c12d Add suppressions for plugins. 2023-09-25 09:33:10 +08:00
9c034c0f7b Code cleanup for font table. 2023-09-17 20:26:31 +08:00
aa7452aead Draft virtual player strategy. (Amend) 2023-08-24 23:45:57 +08:00
f86562b2f2 Draft virtual player strategy. 2023-08-24 23:44:13 +08:00
8fa2bd1e81 Code structure cleanup. (2) 2023-08-24 16:18:16 +08:00
1f58390298 Code structure cleanup. 2023-08-24 15:47:34 +08:00
e40c98ae1b Update project version. 2023-08-15 21:01:19 +08:00
642a9563ba Fix conditional compilation for Android. 2023-08-15 21:01:00 +08:00
4a1fa48352 Fix incomplete ruleset config displayed on config initialization. 2023-08-15 19:16:16 +08:00
4dc0767e91 Typo fix. 2023-08-11 01:24:01 +08:00
9e82c04898 Fix event priority. 2023-08-07 13:56:17 +08:00
0776eca49d Implement custom ruleset config. (Amend) 2023-08-07 13:55:57 +08:00
af01fb2119 Fix the handle of the slider disappearing permanently after an abnormal range is assigned. 2023-08-02 17:30:20 +08:00
9044631fe7 Implement custom ruleset config. (2) 2023-08-02 17:28:55 +08:00
3b22d4fce3 Fix potential constant flag toggled off incorrectly while optimizing. 2023-08-02 17:25:49 +08:00
5393ff1451 Code cleanup with the implementation of property store. 2023-08-02 17:20:45 +08:00
e34a9cc868 Implement custom ruleset config. 2023-07-31 15:15:07 +08:00
440581261e Add contextual function precision. 2023-07-31 15:14:06 +08:00
b78e99c59c Reconstruct property sources and operators to generic types. 2023-07-31 15:12:41 +08:00
3db8f61e3b Decouple the usage of PDT evaluator of chart player. 2023-07-28 14:13:49 +08:00
8b64165fb7 Fix incorrect layout of popup in camera canvas mode. 2023-07-28 14:10:03 +08:00
799b1e12da Code cleanup. 2023-07-28 13:33:23 +08:00
957270c41a Code cleanup. 2023-07-28 12:17:03 +08:00
bc51a45df8 Rewrite property panel to adapt to ruleset config. 2023-07-27 22:07:20 +08:00
9b091a0084 Rename constraint types to avoid ambiguity. 2023-07-27 22:06:15 +08:00
98e35fc6f6 Distinguish stepped sliders by applying a tint to them. 2023-07-27 16:22:22 +08:00
d83f447e82 Fix number slider not working in camera canvas mode. 2023-07-27 16:21:27 +08:00
898885b116 Scene cleanup. 2023-07-27 16:04:42 +08:00
fd05f6c1dd Add contextual function range. 2023-07-27 16:00:22 +08:00
86da71f2cb Draft config definition. 2023-07-27 15:59:56 +08:00
ba2f1d4858 Fix attempt to save config when failed to load. 2023-07-27 15:31:47 +08:00
3687a70aec Import Android Apk Patch. 2023-07-25 22:12:17 +08:00
8da54093aa Code cleanup. 2023-07-14 23:49:27 +08:00
b057ea8074 Fix the game hanging on close. 2023-07-14 23:48:13 +08:00
e7bc9d0294 Code cleanup. 2023-07-12 23:26:36 +08:00
08de91b04d Implement updater for Windows. 2023-07-12 23:26:26 +08:00
ea70fbb051 Improve exception handling for update checker. 2023-07-12 23:25:15 +08:00
cee6a08240 Refactor some judge variables to hit variables. (Amend) 2023-07-12 23:12:55 +08:00
f04b9cfb75 Refactor some judge variables to hit variables. 2023-07-12 23:08:29 +08:00
1dcbc03829 Code cleanup. 2023-07-11 00:03:47 +08:00
d89423caf5 Code cleanup for network module. 2023-07-11 00:02:14 +08:00
c9b348dd4f Fix Discord timestamp not reset on pause and resume. 2023-07-11 00:01:15 +08:00
636f45f03f Fix dialog layout. 2023-07-04 11:13:46 +08:00
7fce9591a9 Fix crash on opening a URL on Android. 2023-07-04 11:13:28 +08:00
f65e4f1900 Cleanup network module. 2023-07-04 11:12:27 +08:00
a4d0e3867a Code cleanup. 2023-07-03 01:11:04 +08:00
83b9c27e94 Implement opening external package link. 2023-07-03 01:10:45 +08:00
864ea91be0 Implement update checker. 2023-06-22 13:23:24 +08:00
ea02fc22bd Pull down UnityNetworkTask. 2023-06-22 13:23:03 +08:00
60cc763cd0 Fix the active network task not re-enqueued when suspended. 2023-06-22 13:22:23 +08:00
8955b69cdf Fix active inputs not cleaned up while batching. 2023-06-22 13:21:01 +08:00
a7aff4d625 Code cleanup. 2023-06-22 13:18:34 +08:00
22cb8f0cb4 Implement dialog. 2023-06-22 13:15:25 +08:00
db07ace927 Code cleanup. 2023-06-13 18:13:23 +08:00
094c3fe2a3 Add contextual variable judge_delta_time. 2023-06-13 18:13:09 +08:00
cc156e0d81 Fix certain non-interactable UI blocking interaction. 2023-06-06 21:28:17 +08:00
9833052849 Improve the ordering logic for applicable input handlers in input config. 2023-06-06 21:27:33 +08:00
a6a0ac3f9e Fix memory leak during collapsing in PDT. 2023-06-06 21:13:36 +08:00
720 changed files with 45501 additions and 33695 deletions

View File

@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: ff84d017aa87efe40a398305f6c66f4d
folderAsset: yes
timeCreated: 1611481582
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,921 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-8721260600392589857
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -1711742599587662259}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!114 &-7544382450586515317
MonoBehaviour:
m_ObjectHideFlags: 1
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: 57079cdf55a0d1149903f00ee732fa85, type: 3}
m_Name:
m_EditorClassIdentifier:
m_name: ContentIndex
m_value: 0
--- !u!1102 &-7525596204709797473
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TConfig_Main
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -5132645766795686971}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: d815e4d844e6a1c4d849e96e199f8881, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-5132645766795686971
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110253476}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!114 &-3269459075475511263
MonoBehaviour:
m_ObjectHideFlags: 1
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: 57079cdf55a0d1149903f00ee732fa85, type: 3}
m_Name:
m_EditorClassIdentifier:
m_name: ContentIndex
m_value: 1
--- !u!1101 &-2014865272520557121
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: G_Back
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7525596204709797473}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-1711742599587662259
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IConfig
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -2014865272520557121}
- {fileID: 6725764225238317576}
m_StateMachineBehaviours:
- {fileID: -3269459075475511263}
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 2e0c61e29fd90f04b9e41265d93e2029, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1109 &-148366939711131180
AnimatorTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102561020678939018}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 1
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Canvas
serializedVersion: 5
m_AnimatorParameters:
- m_Name: G_Back
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: T_Main
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: T_Settings
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: T_Config
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: ContentIndex
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base
m_StateMachine: {fileID: 110726924}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &110148126
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110253476}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110151648
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: G_Back
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110282074}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110171968
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110265034}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110175238
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: G_Back
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110223554}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110179560
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: G_Back
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110282074}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110191838
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110253476}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110192662
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: T_Main
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110291586}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &110205842
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IStartup
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110192662}
- {fileID: 110179560}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 9d0c0a0c88a0e7a43b77b0065bb64721, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &110223554
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TQuit_
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110148126}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 0cc97e0bf50ad9c4e834c28e6eddf416, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &110253476
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IMain
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110151648}
- {fileID: 1101244981468607914}
- {fileID: 4268828270460367803}
m_StateMachineBehaviours:
- {fileID: -7544382450586515317}
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 2162866fb7549724a85cb3c854a136ad, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &110265034
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IQuit
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110175238}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 6e50faab4238b5548bb05a7d421f5405, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &110282074
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_Quit
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110171968}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: cc249d3462d795b46aff263bc04baee2, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &110291586
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TStartup_Main
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110191838}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 63a0e2075f5ba8d489d8cd318c14720b, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &110726924
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110291586}
m_Position: {x: 470, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 110205842}
m_Position: {x: 240, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 110253476}
m_Position: {x: 470, y: 60, z: 0}
- serializedVersion: 1
m_State: {fileID: 110282074}
m_Position: {x: 240, y: 60, z: 0}
- serializedVersion: 1
m_State: {fileID: 110265034}
m_Position: {x: 240, y: 0, z: 0}
- serializedVersion: 1
m_State: {fileID: 110223554}
m_Position: {x: 468, y: 0, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102561020678939018}
m_Position: {x: 730, y: -50, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102656588130233220}
m_Position: {x: 1210, y: 50, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102582640015115930}
m_Position: {x: 730, y: 170, z: 0}
- serializedVersion: 1
m_State: {fileID: 7271406375099633063}
m_Position: {x: 730, y: 30, z: 0}
- serializedVersion: 1
m_State: {fileID: -1711742599587662259}
m_Position: {x: 960, y: 50, z: 0}
- serializedVersion: 1
m_State: {fileID: -7525596204709797473}
m_Position: {x: 730, y: 90, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions:
- first: {fileID: 0}
second: []
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 48, y: 60, z: 0}
m_EntryPosition: {x: 48, y: 120, z: 0}
m_ExitPosition: {x: 48, y: 0, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110205842}
--- !u!1109 &18581713490072034
AnimatorTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102656588130233220}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 1
--- !u!1101 &1101118093461196680
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: G_Back
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102582640015115930}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101244981468607914
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: T_Settings
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102561020678939018}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101331669488027508
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102656588130233220}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101824047535165308
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: ContentIndex
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110253476}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102561020678939018
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_Settings
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101331669488027508}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 961473ba26b4b1942806c224266f8db7, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102582640015115930
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TSettings_
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101824047535165308}
- {fileID: 6325091892004037592}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 9f6fb5723dba03d42b9e8a3c3e9091a5, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102656588130233220
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ISettings
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101118093461196680}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 8b9f1682ee8026b468ad15885e1ff6a5, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &4268828270460367803
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: T_Config
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 7271406375099633063}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!114 &6019547548074810887
MonoBehaviour:
m_ObjectHideFlags: 1
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: d48088ca586ef5a41a42f6564e35b230, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onEnter:
m_PersistentCalls:
m_Calls: []
m_CallsDirty: 1
--- !u!1101 &6325091892004037592
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: ContentIndex
m_EventTreshold: 1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -1711742599587662259}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &6725764225238317576
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: T_Settings
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102561020678939018}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &7271406375099633063
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TMain_Config
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -8721260600392589857}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 0
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 82867c59112ff5a419fbea2ebff2d3b9, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c96c5f91fd684d14d9d4c09a5f34ee5d
timeCreated: 1637144068
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,431 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IConfig
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/MainContents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1063882198
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 512889948
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 135068749
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3949350096
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2089119715
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2711263438
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.016666668
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/MainContents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2e0c61e29fd90f04b9e41265d93e2029
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2162866fb7549724a85cb3c854a136ad
timeCreated: 1637144548
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,179 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IQuit
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1984038178
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 1984038178
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.016666668
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 6e50faab4238b5548bb05a7d421f5405
timeCreated: 1637145598
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,305 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ISettings
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 135068749
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3949350096
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2952582672
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.016666668
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8b9f1682ee8026b468ad15885e1ff6a5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,179 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IStartup
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Startup
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1301050145
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 724789610
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.016666668
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Startup
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.016666668
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9d0c0a0c88a0e7a43b77b0065bb64721
timeCreated: 1637144134
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,305 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TConfig_Main
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/MainContents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1063882198
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 512889948
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2711263438
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2089119715
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.33333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/MainContents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,224 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TMain_Config
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1301050145
attribute: 2089119715
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2711263438
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 1063882198
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.33333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: -1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents/Config
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 82867c59112ff5a419fbea2ebff2d3b9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,242 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TQuit_
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -6
outSlope: -6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: -6
outSlope: -6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay/Quit
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1984038178
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 1984038178
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3251364855
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -6
outSlope: -6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: -6
outSlope: -6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.16666667
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay/Quit
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 0cc97e0bf50ad9c4e834c28e6eddf416
timeCreated: 1637145877
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,368 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TSettings_
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.88
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.5019608
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path: SettingsOverlay
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 135068749
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2952582672
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 135068749
attribute: 304273561
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3949350096
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.33333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.88
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.5019608
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path: SettingsOverlay
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9f6fb5723dba03d42b9e8a3c3e9091a5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,854 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TStartup_Main
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Startup
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: -0.08
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents/Sidebar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 0
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.08
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents/Sidebar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 1.08
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.08
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents/MainContents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 2
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents/MainContents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1.2
inSlope: -0.60000014
outSlope: -0.60000014
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: -0.60000014
outSlope: -0.60000014
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.y
path: Topbar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Startup
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1.05
inSlope: -0.5999998
outSlope: -0.5999998
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.85
inSlope: -0.5999998
outSlope: -0.5999998
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.y
path: Topbar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Topbar
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.49999997
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.49999997
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.x
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -0.36
outSlope: -0.36
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.88
inSlope: -0.36
outSlope: -0.36
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 724789610
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 2953535754
attribute: 2089119715
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 2953535754
attribute: 2711263438
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 512889948
attribute: 2089119715
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 512889948
attribute: 2711263438
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 3745447674
attribute: 3600656472
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 724789610
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3745447674
attribute: 193093493
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2952582672
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 1301050145
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3745447674
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 3640387206
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.33333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Startup
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: -0.08
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents/Sidebar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 0
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.08
inSlope: 0.32
outSlope: 0.32
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents/Sidebar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 1.08
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.08
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.x
path: Contents/MainContents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.083333336
value: 2
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: -4
outSlope: -4
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: Contents/MainContents
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1.2
inSlope: -0.60000014
outSlope: -0.60000014
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: -0.60000014
outSlope: -0.60000014
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.y
path: Topbar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: -3
outSlope: -3
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Startup
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Contents
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1.05
inSlope: -0.5999998
outSlope: -0.5999998
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.85
inSlope: -0.5999998
outSlope: -0.5999998
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMin.y
path: Topbar
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Topbar
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.49999997
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.49999997
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.x
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: -0.36
outSlope: -0.36
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.88
inSlope: -0.36
outSlope: -0.36
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 63a0e2075f5ba8d489d8cd318c14720b
timeCreated: 1637144068
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,206 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_Quit
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 6
outSlope: 6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 1
inSlope: 6
outSlope: 6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay/Quit
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1984038178
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 1984038178
attribute: 1574349066
script: {fileID: 0}
typeID: 225
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3251364855
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.16666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 6
outSlope: 6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.16666667
value: 1
inSlope: 6
outSlope: 6
tangentMode: 34
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Alpha
path: Overlay
classID: 225
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Overlay/Quit
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cc249d3462d795b46aff263bc04baee2
timeCreated: 1637144561
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,368 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_Settings
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.88
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.5019608
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path: SettingsOverlay
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 473154195
attribute: 2952582672
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
- serializedVersion: 2
path: 135068749
attribute: 304273561
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 3949350096
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 473154195
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 135068749
attribute: 2086281974
script: {fileID: 0}
typeID: 1
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.33333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.88
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Pivot.y
path: Settings
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: SettingsOverlay
classID: 1
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 0.5019608
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path: SettingsOverlay
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.33333334
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_IsActive
path: Settings/OverlayBack
classID: 1
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 961473ba26b4b1942806c224266f8db7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8a36c371ab6077d43ac28fe09b0fe675
timeCreated: 1620725915
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -20,13 +20,13 @@ namespace Cryville.Common {
/// <param name="succeeded">Whether the task has succeeded.</param>
/// <param name="result">The result.</param>
public void Deliver(bool succeeded, T result) {
if (Destination != null) Destination(succeeded, result);
Destination?.Invoke(succeeded, result);
}
/// <summary>
/// Cancels the task.
/// </summary>
public void Cancel() {
if (CancelSource != null) CancelSource();
CancelSource?.Invoke();
}
}
}

View File

@@ -35,8 +35,8 @@ namespace Cryville.Common {
return null;
else if (type.IsAssignableFrom(value.GetType()))
return value;
else if (type.IsEnum && value is string) {
return Enum.Parse(type, (string)value);
else if (type.IsEnum && value is string strValue) {
return Enum.Parse(type, strValue);
}
throw new InvalidCastException(string.Format("Cannot cast {0} to {1}", value.GetType(), type));
}

View File

@@ -3,12 +3,12 @@ using System;
namespace Cryville.Common.ComponentModel {
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class RangeAttribute : Attribute {
public RangeAttribute(float min, float max) {
public RangeAttribute(double min, double max) {
Min = min;
Max = max;
}
public float Min { get; set; }
public float Max { get; set; }
public double Min { get; set; }
public double Max { get; set; }
}
}

View File

@@ -3,9 +3,9 @@ using System;
namespace Cryville.Common.ComponentModel {
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class StepAttribute : Attribute {
public StepAttribute(float step) {
public StepAttribute(double step) {
Step = step;
}
public float Step { get; set; }
public double Step { get; set; }
}
}

View File

@@ -4,7 +4,7 @@ using System.Diagnostics;
namespace Cryville.Common {
public class Coroutine {
readonly IEnumerator<float> _enumerator;
readonly Stopwatch _stopwatch = new Stopwatch();
readonly Stopwatch _stopwatch = new();
public float Progress { get; private set; }
public Coroutine(IEnumerator<float> enumerator) {
_enumerator = enumerator;

View File

@@ -1,37 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Cryville.Common.Culture {
public static class ScriptUtils {
public static string[] Scripts = new string[] { "adlm", "afak", "aghb", "ahom", "arab", "aran", "armi", "armn", "avst", "bali", "bamu", "bass", "batk", "beng", "bhks", "blis", "bopo", "brah", "brai", "bugi", "buhd", "cakm", "cans", "cari", "cham", "cher", "chrs", "cirt", "copt", "cpmn", "cprt", "cyrl", "cyrs", "deva", "diak", "dogr", "dsrt", "dupl", "egyd", "egyh", "egyp", "elba", "elym", "ethi", "geok", "geor", "glag", "gong", "gonm", "goth", "gran", "grek", "gujr", "guru", "hanb", "hang", "hani", "hano", "hans", "hant", "hatr", "hebr", "hira", "hluw", "hmng", "hmnp", "hrkt", "hung", "inds", "ital", "jamo", "java", "jpan", "jurc", "kali", "kana", "khar", "khmr", "khoj", "kitl", "kits", "knda", "kore", "kpel", "kthi", "lana", "laoo", "latf", "latg", "latn", "leke", "lepc", "limb", "lina", "linb", "lisu", "loma", "lyci", "lydi", "mahj", "maka", "mand", "mani", "marc", "maya", "medf", "mend", "merc", "mero", "mlym", "modi", "mong", "moon", "mroo", "mtei", "mult", "mymr", "nand", "narb", "nbat", "newa", "nkdb", "nkgb", "nkoo", "nshu", "ogam", "olck", "orkh", "orya", "osge", "osma", "ougr", "palm", "pauc", "pcun", "pelm", "perm", "phag", "phli", "phlp", "phlv", "phnx", "piqd", "plrd", "prti", "psin", "qaaa", "qaai", "qabx", "ranj", "rjng", "rohg", "roro", "runr", "samr", "sara", "sarb", "saur", "sgnw", "shaw", "shrd", "shui", "sidd", "sind", "sinh", "sogd", "sogo", "sora", "soyo", "sund", "sylo", "syrc", "syre", "syrj", "syrn", "tagb", "takr", "tale", "talu", "taml", "tang", "tavt", "telu", "teng", "tfng", "tglg", "thaa", "thai", "tibt", "tirh", "toto", "ugar", "vaii", "visp", "wara", "wcho", "wole", "xpeo", "xsux", "yezi", "yiii", "zanb", "zinh", "zmth", "zsye", "zsym", "zxxx", "zyyy", "zzzz", };
public static string UltimateFallbackScript = "zyyy";
public static Dictionary<string, string[]> FallbackScriptMap = new Dictionary<string, string[]> {
{ "aran", new string[] { "arab" } }, { "cyrs", new string[] { "cyrl" } },
{ "hanb", new string[] { "hant", "bopo" } }, { "hans", new string[] { "hani" } }, { "hant", new string[] { "hani" } },
{ "hrkt", new string[] { "hira", "kana" } }, { "jpan", new string[] { "hani", "hira", "kana" } },
{ "jamo", new string[] { "hang" } }, { "kore", new string[] { "hang", "hani" } },
{ "latf", new string[] { "latn" } }, { "latg", new string[] { "latn" } },
{ "syre", new string[] { "syrc" } }, { "syrj", new string[] { "syrc" } }, { "syrn", new string[] { "syrc" } },
{ "zsye", new string[] { "zsym" } },
};
public static void FillKeysWithScripts(IDictionary dict, Func<object> value) {
foreach (var s in Scripts) dict.Add(s, value());
}
public static IEnumerable<string> EnumerateFallbackScripts(string script) {
if (string.IsNullOrEmpty(script)) throw new ArgumentNullException("script");
script = script.ToLower();
if (script == UltimateFallbackScript) {
yield return null;
yield break;
}
string[] fblist;
if (FallbackScriptMap.TryGetValue(script, out fblist)) {
foreach (var fb in fblist) {
yield return fb;
}
}
else yield return UltimateFallbackScript;
}
}
}

View File

@@ -16,13 +16,11 @@ namespace Cryville.Common.Font {
}
public void Close() { Reader.Close(); }
public static FontFile Create(FileInfo file) {
switch (file.Extension) {
case ".ttf": case ".otf": return new FontFileTTF(file);
case ".ttc": case ".otc": return new FontFileTTC(file);
default: return null;
}
}
public static FontFile Create(FileInfo file) => file.Extension switch {
".ttf" or ".otf" => new FontFileTTF(file),
".ttc" or ".otc" => new FontFileTTC(file),
_ => null,
};
public Enumerator GetEnumerator() {
return new Enumerator(this);
@@ -42,7 +40,7 @@ namespace Cryville.Common.Font {
_index = -1;
}
public Typeface Current {
public readonly Typeface Current {
get {
if (_index < 0)
throw new InvalidOperationException(_index == -1 ? "Enum not started" : "Enum ended");
@@ -50,7 +48,7 @@ namespace Cryville.Common.Font {
}
}
object IEnumerator.Current { get { return Current; } }
readonly object IEnumerator.Current => Current;
public void Dispose() {
_index = -2;

View File

@@ -4,24 +4,25 @@ using System.Linq;
namespace Cryville.Common.Font {
public abstract class FontManager {
public IReadOnlyDictionary<string, IReadOnlyCollection<Typeface>> MapFullNameToTypeface { get; private set; }
public IReadOnlyDictionary<string, Typeface> MapFullNameToTypeface { get; private set; }
public IReadOnlyDictionary<string, IReadOnlyCollection<Typeface>> MapNameToTypefaces { get; private set; }
public FontManager() {
var map1 = new Dictionary<string, List<Typeface>>();
var map1 = new Dictionary<string, Typeface>();
var map2 = new Dictionary<string, List<Typeface>>();
foreach (var f in EnumerateAllTypefaces()) {
List<Typeface> set1;
if (!map1.TryGetValue(f.FullName, out set1)) {
map1.Add(f.FullName, set1 = new List<Typeface>());
if (!map1.ContainsKey(f.FullName)) {
map1.Add(f.FullName, f);
}
set1.Add(f);
List<Typeface> set2;
if (!map2.TryGetValue(f.FamilyName, out set2)) {
else {
Shared.Logger.Log(3, "UI", "Discarding a font with a duplicate full name {0}", f.FullName);
continue;
}
if (!map2.TryGetValue(f.FamilyName, out List<Typeface> set2)) {
map2.Add(f.FamilyName, set2 = new List<Typeface>());
}
set2.Add(f);
}
MapFullNameToTypeface = map1.ToDictionary(i => i.Key, i => (IReadOnlyCollection<Typeface>)i.Value);
MapFullNameToTypeface = map1;
MapNameToTypefaces = map2.ToDictionary(i => i.Key, i => (IReadOnlyCollection<Typeface>)i.Value);
}
protected abstract IEnumerable<Typeface> EnumerateAllTypefaces();

View File

@@ -1,4 +1,4 @@
using Cryville.Common.Culture;
using Cryville.Culture;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,323 +6,339 @@ using System.Linq;
namespace Cryville.Common.Font {
public abstract class FontMatcher {
protected FontManager Manager { get; private set; }
public FontMatcher(FontManager manafer) { Manager = manafer; }
public abstract IEnumerable<Typeface> MatchScript(string script = null, bool distinctFamily = false);
public FontMatcher(FontManager manager) { Manager = manager; }
public abstract IEnumerable<Typeface> MatchLanguage(LanguageId lang, bool distinctFamily = false);
}
public class FallbackListFontMatcher : FontMatcher {
public Dictionary<string, List<string>> MapScriptToTypefaces = new Dictionary<string, List<string>>();
public void LoadDefaultWindowsFallbackList() {
if (Environment.OSVersion.Platform != PlatformID.Win32NT) return;
MapScriptToTypefaces.Clear();
ScriptUtils.FillKeysWithScripts(MapScriptToTypefaces, () => new List<string>());
readonly LanguageMatching _matcher;
static readonly string UltimateFallbackScript = "zzzz";
public Dictionary<string, List<string>> MapScriptToTypefaces = new();
public static Dictionary<string, List<string>> GetDefaultWindowsFallbackMap() {
var map = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
FillKeysWithScripts(map, () => new List<string>());
// Reference: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc
MapScriptToTypefaces["zyyy"].Insert(0, "SimSun"); // Custom
MapScriptToTypefaces["zyyy"].Insert(0, "SimHei"); // Custom
MapScriptToTypefaces["zyyy"].Insert(0, "Microsoft YaHei"); // Custom
MapScriptToTypefaces["zyyy"].Insert(0, "Arial");
MapScriptToTypefaces["zyyy"].Insert(0, "Times New Roman");
MapScriptToTypefaces["zyyy"].Insert(0, "Segoe UI"); // Custom
MapScriptToTypefaces["arab"].Insert(0, "Tahoma");
MapScriptToTypefaces["cyrl"].Insert(0, "Times New Roman");
MapScriptToTypefaces["grek"].Insert(0, "Times New Roman");
MapScriptToTypefaces["hebr"].Insert(0, "David");
MapScriptToTypefaces["jpan"].Insert(0, "MS PGothic");
MapScriptToTypefaces["latn"].Insert(0, "Times New Roman");
MapScriptToTypefaces["hans"].Insert(0, "SimSun");
MapScriptToTypefaces["hans"].Insert(0, "SimHei"); // Custom
MapScriptToTypefaces["thai"].Insert(0, "Tahoma");
MapScriptToTypefaces["hans"].Insert(0, "PMingLiU");
map[UltimateFallbackScript].Insert(0, "SimSun"); // Custom
map[UltimateFallbackScript].Insert(0, "SimHei"); // Custom
map[UltimateFallbackScript].Insert(0, "Microsoft YaHei"); // Custom
map[UltimateFallbackScript].Insert(0, "Arial");
map[UltimateFallbackScript].Insert(0, "Times New Roman");
map[UltimateFallbackScript].Insert(0, "Segoe UI"); // Custom
map["arab"].Insert(0, "Tahoma");
map["cyrl"].Insert(0, "Times New Roman");
map["grek"].Insert(0, "Times New Roman");
map["hebr"].Insert(0, "David");
map["jpan"].Insert(0, "MS PGothic");
map["latn"].Insert(0, "Times New Roman");
map["hans"].Insert(0, "SimSun");
map["hans"].Insert(0, "SimHei"); // Custom
map["thai"].Insert(0, "Tahoma");
map["hans"].Insert(0, "PMingLiU");
// Reference: https://learn.microsoft.com/en-us/globalization/input/font-support
var ver = Environment.OSVersion.Version;
if (ver >= new Version(5, 0)) { // Windows 2000
MapScriptToTypefaces["armn"].Insert(0, "Sylfaen");
MapScriptToTypefaces["deva"].Insert(0, "Mangal");
MapScriptToTypefaces["geor"].Insert(0, "Sylfaen");
MapScriptToTypefaces["taml"].Insert(0, "Latha");
map["armn"].Insert(0, "Sylfaen");
map["deva"].Insert(0, "Mangal");
map["geor"].Insert(0, "Sylfaen");
map["taml"].Insert(0, "Latha");
}
if (ver >= new Version(5, 1)) { // Windows XP
MapScriptToTypefaces["gujr"].Insert(0, "Shruti");
MapScriptToTypefaces["guru"].Insert(0, "Raavi");
MapScriptToTypefaces["knda"].Insert(0, "Tunga");
MapScriptToTypefaces["syrc"].Insert(0, "Estrangelo Edessa");
MapScriptToTypefaces["telu"].Insert(0, "Gautami");
MapScriptToTypefaces["thaa"].Insert(0, "MV Boli");
map["gujr"].Insert(0, "Shruti");
map["guru"].Insert(0, "Raavi");
map["knda"].Insert(0, "Tunga");
map["syrc"].Insert(0, "Estrangelo Edessa");
map["telu"].Insert(0, "Gautami");
map["thaa"].Insert(0, "MV Boli");
// SP2
MapScriptToTypefaces["beng"].Insert(0, "Vrinda");
MapScriptToTypefaces["mlym"].Insert(0, "Kartika");
map["beng"].Insert(0, "Vrinda");
map["mlym"].Insert(0, "Kartika");
}
if (ver >= new Version(6, 0)) { // Windows Vista
MapScriptToTypefaces["cans"].Insert(0, "Euphemia");
MapScriptToTypefaces["cher"].Insert(0, "Plantagenet");
MapScriptToTypefaces["ethi"].Insert(0, "Nyala");
MapScriptToTypefaces["khmr"].Insert(0, "DaunPenh MoolBoran");
MapScriptToTypefaces["laoo"].Insert(0, "DokChampa");
MapScriptToTypefaces["mong"].Insert(0, "Mongolian Baiti");
MapScriptToTypefaces["orya"].Insert(0, "Kalinga");
MapScriptToTypefaces["sinh"].Insert(0, "Iskoola Pota");
MapScriptToTypefaces["tibt"].Insert(0, "Microsoft Himalaya");
MapScriptToTypefaces["yiii"].Insert(0, "Microsoft Yi Baiti");
MapScriptToTypefaces["arab"].Insert(0, "Segoe UI");
MapScriptToTypefaces["cyrl"].Insert(0, "Segoe UI");
MapScriptToTypefaces["grek"].Insert(0, "Segoe UI");
MapScriptToTypefaces["latn"].Insert(0, "Segoe UI");
MapScriptToTypefaces["hans"].Add("SimSun-ExtB");
MapScriptToTypefaces["hant"].Add("MingLiU-ExtB");
MapScriptToTypefaces["hant"].Add("MingLiU_HKSCS-ExtB");
MapScriptToTypefaces["arab"].Add("Microsoft Uighur");
MapScriptToTypefaces["zmth"].Insert(0, "Cambria Math");
map["cans"].Insert(0, "Euphemia");
map["cher"].Insert(0, "Plantagenet");
map["ethi"].Insert(0, "Nyala");
map["khmr"].Insert(0, "DaunPenh MoolBoran");
map["kore"].Insert(0, "Malgun Gothic"); // Reference: https://en.wikipedia.org/wiki/List_of_typefaces_included_with_Microsoft_Windows
map["laoo"].Insert(0, "DokChampa");
map["mong"].Insert(0, "Mongolian Baiti");
map["orya"].Insert(0, "Kalinga");
map["sinh"].Insert(0, "Iskoola Pota");
map["tibt"].Insert(0, "Microsoft Himalaya");
map["yiii"].Insert(0, "Microsoft Yi Baiti");
map["arab"].Insert(0, "Segoe UI");
map["cyrl"].Insert(0, "Segoe UI");
map["grek"].Insert(0, "Segoe UI");
map["latn"].Insert(0, "Segoe UI");
map["hans"].Add("SimSun-ExtB");
map["hant"].Add("MingLiU-ExtB");
map["hant"].Add("MingLiU_HKSCS-ExtB");
map["arab"].Add("Microsoft Uighur");
map["zmth"].Insert(0, "Cambria Math");
// Reference: https://en.wikipedia.org/wiki/List_of_CJK_fonts
MapScriptToTypefaces["jpan"].Insert(0, "Meiryo");
MapScriptToTypefaces["hans"].Insert(0, "Microsoft YaHei");
map["jpan"].Insert(0, "Meiryo");
map["hans"].Insert(0, "Microsoft YaHei");
}
if (ver >= new Version(6, 1)) { // Windows 7
MapScriptToTypefaces["brai"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["dsrt"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["talu"].Insert(0, "Microsoft New Tai Lue");
MapScriptToTypefaces["ogam"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["osma"].Insert(0, "Ebrima");
MapScriptToTypefaces["phag"].Insert(0, "Microsoft PhagsPa");
MapScriptToTypefaces["runr"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["zsym"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["tale"].Insert(0, "Microsoft Tai Le");
MapScriptToTypefaces["tfng"].Insert(0, "Ebrima");
MapScriptToTypefaces["vaii"].Insert(0, "Ebrima");
map["brai"].Insert(0, "Segoe UI Symbol");
map["dsrt"].Insert(0, "Segoe UI Symbol");
map["talu"].Insert(0, "Microsoft New Tai Lue");
map["ogam"].Insert(0, "Segoe UI Symbol");
map["osma"].Insert(0, "Ebrima");
map["phag"].Insert(0, "Microsoft PhagsPa");
map["runr"].Insert(0, "Segoe UI Symbol");
map["zsym"].Insert(0, "Segoe UI Symbol");
map["tale"].Insert(0, "Microsoft Tai Le");
map["tfng"].Insert(0, "Ebrima");
map["vaii"].Insert(0, "Ebrima");
}
if (ver >= new Version(6, 2)) { // Windows 8
MapScriptToTypefaces["glag"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["goth"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["hang"].Add("Malgun Gothic");
MapScriptToTypefaces["ital"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["lisu"].Insert(0, "Segoe UI");
MapScriptToTypefaces["mymr"].Insert(0, "Myanmar Text");
MapScriptToTypefaces["nkoo"].Insert(0, "Ebrima");
MapScriptToTypefaces["orkh"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["ethi"].Insert(0, "Ebrima");
MapScriptToTypefaces["cans"].Insert(0, "Gadugi");
MapScriptToTypefaces["hant"].Insert(0, "Microsoft JhengHei UI");
MapScriptToTypefaces["hans"].Insert(0, "Microsoft YaHei UI");
MapScriptToTypefaces["beng"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["deva"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["gujr"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["guru"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
MapScriptToTypefaces["knda"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
MapScriptToTypefaces["mlym"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["orya"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["sinh"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
MapScriptToTypefaces["taml"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
MapScriptToTypefaces["telu"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["armn"].Insert(0, "Segoe UI");
MapScriptToTypefaces["geor"].Insert(0, "Segoe UI");
MapScriptToTypefaces["hebr"].Insert(0, "Segoe UI");
map["glag"].Insert(0, "Segoe UI Symbol");
map["goth"].Insert(0, "Segoe UI Symbol");
map["hang"].Add("Malgun Gothic");
map["ital"].Insert(0, "Segoe UI Symbol");
map["lisu"].Insert(0, "Segoe UI");
map["mymr"].Insert(0, "Myanmar Text");
map["nkoo"].Insert(0, "Ebrima");
map["orkh"].Insert(0, "Segoe UI Symbol");
map["ethi"].Insert(0, "Ebrima");
map["cans"].Insert(0, "Gadugi");
map["hant"].Insert(0, "Microsoft JhengHei UI");
map["hans"].Insert(0, "Microsoft YaHei UI");
map["beng"].Insert(0, "Nirmala UI");
map["deva"].Insert(0, "Nirmala UI");
map["gujr"].Insert(0, "Nirmala UI");
map["guru"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
map["knda"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
map["mlym"].Insert(0, "Nirmala UI");
map["orya"].Insert(0, "Nirmala UI");
map["sinh"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
map["taml"].Insert(0, "Nirmala UI"); // NOT DOCUMENTED, UNVERIFIED
map["telu"].Insert(0, "Nirmala UI");
map["armn"].Insert(0, "Segoe UI");
map["geor"].Insert(0, "Segoe UI");
map["hebr"].Insert(0, "Segoe UI");
}
if (ver >= new Version(6, 3)) { // Windows 8.1
MapScriptToTypefaces["bugi"].Insert(0, "Leelawadee UI");
MapScriptToTypefaces["copt"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["java"].Insert(0, "Javanese Text");
MapScriptToTypefaces["merc"].Insert(0, "Segoe UI Symbol");
MapScriptToTypefaces["olck"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["sora"].Insert(0, "Nirmala UI");
MapScriptToTypefaces["khmr"].Insert(0, "Leelawadee UI");
MapScriptToTypefaces["laoo"].Insert(0, "Leelawadee UI");
MapScriptToTypefaces["thai"].Insert(0, "Leelawadee UI");
MapScriptToTypefaces["zsye"].Insert(0, "Segoe UI Emoji");
map["bugi"].Insert(0, "Leelawadee UI");
map["copt"].Insert(0, "Segoe UI Symbol");
map["java"].Insert(0, "Javanese Text");
map["merc"].Insert(0, "Segoe UI Symbol");
map["olck"].Insert(0, "Nirmala UI");
map["sora"].Insert(0, "Nirmala UI");
map["khmr"].Insert(0, "Leelawadee UI");
map["laoo"].Insert(0, "Leelawadee UI");
map["thai"].Insert(0, "Leelawadee UI");
map["zsye"].Insert(0, "Segoe UI Emoji");
}
if (ver >= new Version(10, 0)) { // Windows 10
MapScriptToTypefaces["brah"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["cari"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["cprt"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["egyp"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["armi"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["phli"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["prti"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["khar"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["lyci"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["lydi"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["phnx"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["xpeo"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["sarb"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["shaw"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["xsux"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["ugar"].Insert(0, "Segoe UI Historic");
map["brah"].Insert(0, "Segoe UI Historic");
map["cari"].Insert(0, "Segoe UI Historic");
map["cprt"].Insert(0, "Segoe UI Historic");
map["egyp"].Insert(0, "Segoe UI Historic");
map["armi"].Insert(0, "Segoe UI Historic");
map["phli"].Insert(0, "Segoe UI Historic");
map["prti"].Insert(0, "Segoe UI Historic");
map["khar"].Insert(0, "Segoe UI Historic");
map["lyci"].Insert(0, "Segoe UI Historic");
map["lydi"].Insert(0, "Segoe UI Historic");
map["phnx"].Insert(0, "Segoe UI Historic");
map["xpeo"].Insert(0, "Segoe UI Historic");
map["sarb"].Insert(0, "Segoe UI Historic");
map["shaw"].Insert(0, "Segoe UI Historic");
map["xsux"].Insert(0, "Segoe UI Historic");
map["ugar"].Insert(0, "Segoe UI Historic");
// Segoe UI Symbol -> Segoe UI Historic
MapScriptToTypefaces["glag"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["goth"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["merc"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["ogam"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["ital"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["orkh"].Insert(0, "Segoe UI Historic");
MapScriptToTypefaces["runr"].Insert(0, "Segoe UI Historic");
map["glag"].Insert(0, "Segoe UI Historic");
map["goth"].Insert(0, "Segoe UI Historic");
map["merc"].Insert(0, "Segoe UI Historic");
map["ogam"].Insert(0, "Segoe UI Historic");
map["ital"].Insert(0, "Segoe UI Historic");
map["orkh"].Insert(0, "Segoe UI Historic");
map["runr"].Insert(0, "Segoe UI Historic");
//
MapScriptToTypefaces["jpan"].Insert(0, "Yu Gothic UI");
MapScriptToTypefaces["zsym"].Add("Segoe MDL2 Assets");
map["jpan"].Insert(0, "Yu Gothic UI");
map["zsym"].Add("Segoe MDL2 Assets");
}
return map;
}
public static Dictionary<string, List<string>> GetDefaultAndroidFallbackMap() {
var map = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
FillKeysWithScripts(map, () => new List<string>());
map[UltimateFallbackScript].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback
map[UltimateFallbackScript].Insert(0, "Noto Sans CJK JP");
map[UltimateFallbackScript].Insert(0, "Noto Sans CJK SC");
map[UltimateFallbackScript].Insert(0, "Roboto");
map["zsye"].Insert(0, "Noto Color Emoji");
map["zsye"].Add("Noto Color Emoji Flags");
map["arab"].Insert(0, "Noto Naskh Arabic");
map["adlm"].Insert(0, "Noto Sans Adlam");
map["ahom"].Insert(0, "Noto Sans Ahom");
map["hluw"].Insert(0, "Noto Sans Anatolian Hieroglyphs");
map["armn"].Insert(0, "Noto Sans Armenian");
map["avst"].Insert(0, "Noto Sans Avestan");
map["bali"].Insert(0, "Noto Sans Balinese");
map["bamu"].Insert(0, "Noto Sans Bamum");
map["bass"].Insert(0, "Noto Sans Bassa Vah");
map["batk"].Insert(0, "Noto Sans Batak");
map["beng"].Insert(0, "Noto Sans Bengali");
map["bhks"].Insert(0, "Noto Sans Bhaiksuki");
map["brah"].Insert(0, "Noto Sans Brahmi");
map["bugi"].Insert(0, "Noto Sans Buginese");
map["buhd"].Insert(0, "Noto Sans Buhid");
map["jpan"].Insert(0, "Noto Sans CJK JP");
map["kore"].Insert(0, "Noto Sans CJK KR");
map["hans"].Insert(0, "Noto Sans CJK SC");
map["hant"].Insert(0, "Noto Sans CJK TC");
map["hant"].Add("Noto Sans CJK HK");
map["cans"].Insert(0, "Noto Sans Canadian Aboriginal");
map["cari"].Insert(0, "Noto Sans Carian");
map["cakm"].Insert(0, "Noto Sans Chakma");
map["cham"].Insert(0, "Noto Sans Cham");
map["cher"].Insert(0, "Noto Sans Cherokee");
map["copt"].Insert(0, "Noto Sans Coptic");
map["xsux"].Insert(0, "Noto Sans Cuneiform");
map["cprt"].Insert(0, "Noto Sans Cypriot");
map["dsrt"].Insert(0, "Noto Sans Deseret");
map["deva"].Insert(0, "Noto Sans Devanagari");
map["egyp"].Insert(0, "Noto Sans Egyptian Hieroglyphs");
map["elba"].Insert(0, "Noto Sans Elbasan");
map["ethi"].Insert(0, "Noto Sans Ethiopic");
map["geor"].Insert(0, "Noto Sans Georgian");
map["glag"].Insert(0, "Noto Sans Glagolitic");
map["goth"].Insert(0, "Noto Sans Gothic");
map["gran"].Insert(0, "Noto Sans Grantha");
map["gujr"].Insert(0, "Noto Sans Gujarati");
map["gong"].Insert(0, "Noto Sans Gunjala Gondi");
map["guru"].Insert(0, "Noto Sans Gurmukhi");
map["rohg"].Insert(0, "Noto Sans Hanifi Rohingya");
map["hano"].Insert(0, "Noto Sans Hanunoo");
map["hatr"].Insert(0, "Noto Sans Hatran");
map["hebr"].Insert(0, "Noto Sans Hebrew");
map["armi"].Insert(0, "Noto Sans Imperial Aramaic");
map["phli"].Insert(0, "Noto Sans Inscriptional Pahlavi");
map["prti"].Insert(0, "Noto Sans Inscriptional Parthian");
map["java"].Insert(0, "Noto Sans Javanese");
map["kthi"].Insert(0, "Noto Sans Kaithi");
map["knda"].Insert(0, "Noto Sans Kannada");
map["kali"].Insert(0, "Noto Sans KayahLi");
map["khar"].Insert(0, "Noto Sans Kharoshthi");
map["khmr"].Insert(0, "Noto Sans Khmer");
map["khoj"].Insert(0, "Noto Sans Khojki");
map["laoo"].Insert(0, "Noto Sans Lao");
map["lepc"].Insert(0, "Noto Sans Lepcha");
map["limb"].Insert(0, "Noto Sans Limbu");
map["lina"].Insert(0, "Noto Sans Linear A");
map["linb"].Insert(0, "Noto Sans Linear B");
map["lisu"].Insert(0, "Noto Sans Lisu");
map["lyci"].Insert(0, "Noto Sans Lycian");
map["lydi"].Insert(0, "Noto Sans Lydian");
map["mlym"].Insert(0, "Noto Sans Malayalam");
map["mand"].Insert(0, "Noto Sans Mandiac");
map["mani"].Insert(0, "Noto Sans Manichaean");
map["marc"].Insert(0, "Noto Sans Marchen");
map["gonm"].Insert(0, "Noto Sans Masaram Gondi");
map["medf"].Insert(0, "Noto Sans Medefaidrin");
map["mtei"].Insert(0, "Noto Sans Meetei Mayek");
map["merc"].Insert(0, "Noto Sans Meroitic");
map["mero"].Insert(0, "Noto Sans Meroitic");
map["plrd"].Insert(0, "Noto Sans Miao");
map["modi"].Insert(0, "Noto Sans Modi");
map["mong"].Insert(0, "Noto Sans Mongolian");
map["mroo"].Insert(0, "Noto Sans Mro");
map["mult"].Insert(0, "Noto Sans Multani");
map["mymr"].Insert(0, "Noto Sans Myanmar");
map["nkoo"].Insert(0, "Noto Sans Nko");
map["nbat"].Insert(0, "Noto Sans Nabataean");
map["talu"].Insert(0, "Noto Sans New Tai Lue");
map["newa"].Insert(0, "Noto Sans Newa");
map["ogam"].Insert(0, "Noto Sans Ogham");
map["olck"].Insert(0, "Noto Sans Ol Chiki");
map["ital"].Insert(0, "Noto Sans Old Italian");
map["narb"].Insert(0, "Noto Sans Old North Arabian");
map["perm"].Insert(0, "Noto Sans Old Permic");
map["xpeo"].Insert(0, "Noto Sans Old Persian");
map["sarb"].Insert(0, "Noto Sans Old South Arabian");
map["orkh"].Insert(0, "Noto Sans Old Turkic");
map["orya"].Insert(0, "Noto Sans Oriya");
map["osge"].Insert(0, "Noto Sans Osage");
map["osma"].Insert(0, "Noto Sans Osmanya");
map["hmng"].Insert(0, "Noto Sans Pahawh Hmong");
map["palm"].Insert(0, "Noto Sans Palmyrene");
map["pauc"].Insert(0, "Noto Sans Pau Cin Hau");
map["phag"].Insert(0, "Noto Sans Phags Pa");
map["phnx"].Insert(0, "Noto Sans Phoenician");
map["rjng"].Insert(0, "Noto Sans Rejang");
map["runr"].Insert(0, "Noto Sans Runic");
map["samr"].Insert(0, "Noto Sans Samaritan");
map["saur"].Insert(0, "Noto Sans Saurashtra");
map["shrd"].Insert(0, "Noto Sans Sharada");
map["shaw"].Insert(0, "Noto Sans Shavian");
map["sinh"].Insert(0, "Noto Sans Sinhala");
map["sora"].Insert(0, "Noto Sans Sora Sompeng");
map["soyo"].Insert(0, "Noto Sans Soyombo");
map["sund"].Insert(0, "Noto Sans Sundanese");
map["sylo"].Insert(0, "Noto Sans Syloti Nagri");
map["zsym"].Insert(0, "Noto Sans Symbols");
map["syrc"].Add("Noto Sans Syriac Eastern");
map["syrc"].Add("Noto Sans Syriac Western");
map["syrc"].Add("Noto Sans Syriac Estrangela");
map["tglg"].Insert(0, "Noto Sans Tagalog");
map["tagb"].Insert(0, "Noto Sans Tagbanwa");
map["tale"].Insert(0, "Noto Sans Tai Le");
map["lana"].Insert(0, "Noto Sans Tai Tham");
map["tavt"].Insert(0, "Noto Sans Tai Viet");
map["takr"].Insert(0, "Noto Sans Takri");
map["taml"].Insert(0, "Noto Sans Tamil");
map["telu"].Insert(0, "Noto Sans Telugu");
map["thaa"].Insert(0, "Noto Sans Thaana");
map["thai"].Insert(0, "Noto Sans Thai");
map["tfng"].Insert(0, "Noto Sans Tifinagh");
map["ugar"].Insert(0, "Noto Sans Ugaritic");
map["vaii"].Insert(0, "Noto Sans Vai");
map["wcho"].Insert(0, "Noto Sans Wancho");
map["wara"].Insert(0, "Noto Sans Warang Citi");
map["yiii"].Insert(0, "Noto Sans Yi");
return map;
}
static void FillKeysWithScripts<T>(IDictionary<string, T> map, Func<T> value) {
foreach (var s in IdValidity.Enumerate("script")) map.Add(s, value());
}
public FallbackListFontMatcher(LanguageMatching matcher, FontManager manager) : base(manager) {
_matcher = matcher;
}
public override IEnumerable<Typeface> MatchLanguage(LanguageId lang, bool distinctFamily = false) {
var supported = MapScriptToTypefaces.Keys.Select(i => new LanguageId(i)).ToList();
bool flag = false;
while (_matcher.Match(lang, supported, out var match, out var distance)) {
if (distance > 40) break;
Shared.Logger.Log(0, "UI", "Matching fonts for language {0}, distance = {1}", match, distance);
if (match.Script.Equals(UltimateFallbackScript, StringComparison.OrdinalIgnoreCase)) {
flag = true;
}
var candidates = MapScriptToTypefaces[match.Script];
foreach (var typeface in EnumerateTypefaces(candidates, distinctFamily)) {
yield return typeface;
}
supported.Remove(match);
}
if (flag) yield break;
Shared.Logger.Log(0, "UI", "Matching fallback fonts");
foreach (var typeface in EnumerateTypefaces(MapScriptToTypefaces[UltimateFallbackScript], distinctFamily)) {
yield return typeface;
}
}
public void LoadDefaultAndroidFallbackList() {
if (Environment.OSVersion.Platform != PlatformID.Unix) return;
MapScriptToTypefaces.Clear();
ScriptUtils.FillKeysWithScripts(MapScriptToTypefaces, () => new List<string>());
MapScriptToTypefaces["zyyy"].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback
MapScriptToTypefaces["zyyy"].Insert(0, "Noto Sans CJK JP");
MapScriptToTypefaces["zyyy"].Insert(0, "Noto Sans CJK SC");
MapScriptToTypefaces["zyyy"].Insert(0, "Roboto");
MapScriptToTypefaces["zsye"].Insert(0, "Noto Color Emoji");
MapScriptToTypefaces["zsye"].Add("Noto Color Emoji Flags");
MapScriptToTypefaces["arab"].Insert(0, "Noto Naskh Arabic");
MapScriptToTypefaces["adlm"].Insert(0, "Noto Sans Adlam");
MapScriptToTypefaces["ahom"].Insert(0, "Noto Sans Ahom");
MapScriptToTypefaces["hluw"].Insert(0, "Noto Sans Anatolian Hieroglyphs");
MapScriptToTypefaces["armn"].Insert(0, "Noto Sans Armenian");
MapScriptToTypefaces["avst"].Insert(0, "Noto Sans Avestan");
MapScriptToTypefaces["bali"].Insert(0, "Noto Sans Balinese");
MapScriptToTypefaces["bamu"].Insert(0, "Noto Sans Bamum");
MapScriptToTypefaces["bass"].Insert(0, "Noto Sans Bassa Vah");
MapScriptToTypefaces["batk"].Insert(0, "Noto Sans Batak");
MapScriptToTypefaces["beng"].Insert(0, "Noto Sans Bengali");
MapScriptToTypefaces["bhks"].Insert(0, "Noto Sans Bhaiksuki");
MapScriptToTypefaces["brah"].Insert(0, "Noto Sans Brahmi");
MapScriptToTypefaces["bugi"].Insert(0, "Noto Sans Buginese");
MapScriptToTypefaces["buhd"].Insert(0, "Noto Sans Buhid");
MapScriptToTypefaces["jpan"].Insert(0, "Noto Sans CJK JP");
MapScriptToTypefaces["kore"].Insert(0, "Noto Sans CJK KR");
MapScriptToTypefaces["hans"].Insert(0, "Noto Sans CJK SC");
MapScriptToTypefaces["hant"].Insert(0, "Noto Sans CJK TC");
MapScriptToTypefaces["hant"].Add("Noto Sans CJK HK");
MapScriptToTypefaces["cans"].Insert(0, "Noto Sans Canadian Aboriginal");
MapScriptToTypefaces["cari"].Insert(0, "Noto Sans Carian");
MapScriptToTypefaces["cakm"].Insert(0, "Noto Sans Chakma");
MapScriptToTypefaces["cham"].Insert(0, "Noto Sans Cham");
MapScriptToTypefaces["cher"].Insert(0, "Noto Sans Cherokee");
MapScriptToTypefaces["copt"].Insert(0, "Noto Sans Coptic");
MapScriptToTypefaces["xsux"].Insert(0, "Noto Sans Cuneiform");
MapScriptToTypefaces["cprt"].Insert(0, "Noto Sans Cypriot");
MapScriptToTypefaces["dsrt"].Insert(0, "Noto Sans Deseret");
MapScriptToTypefaces["deva"].Insert(0, "Noto Sans Devanagari");
MapScriptToTypefaces["egyp"].Insert(0, "Noto Sans Egyptian Hieroglyphs");
MapScriptToTypefaces["elba"].Insert(0, "Noto Sans Elbasan");
MapScriptToTypefaces["ethi"].Insert(0, "Noto Sans Ethiopic");
MapScriptToTypefaces["geor"].Insert(0, "Noto Sans Georgian");
MapScriptToTypefaces["glag"].Insert(0, "Noto Sans Glagolitic");
MapScriptToTypefaces["goth"].Insert(0, "Noto Sans Gothic");
MapScriptToTypefaces["gran"].Insert(0, "Noto Sans Grantha");
MapScriptToTypefaces["gujr"].Insert(0, "Noto Sans Gujarati");
MapScriptToTypefaces["gong"].Insert(0, "Noto Sans Gunjala Gondi");
MapScriptToTypefaces["guru"].Insert(0, "Noto Sans Gurmukhi");
MapScriptToTypefaces["rohg"].Insert(0, "Noto Sans Hanifi Rohingya");
MapScriptToTypefaces["hano"].Insert(0, "Noto Sans Hanunoo");
MapScriptToTypefaces["hatr"].Insert(0, "Noto Sans Hatran");
MapScriptToTypefaces["hebr"].Insert(0, "Noto Sans Hebrew");
MapScriptToTypefaces["armi"].Insert(0, "Noto Sans Imperial Aramaic");
MapScriptToTypefaces["phli"].Insert(0, "Noto Sans Inscriptional Pahlavi");
MapScriptToTypefaces["prti"].Insert(0, "Noto Sans Inscriptional Parthian");
MapScriptToTypefaces["java"].Insert(0, "Noto Sans Javanese");
MapScriptToTypefaces["kthi"].Insert(0, "Noto Sans Kaithi");
MapScriptToTypefaces["knda"].Insert(0, "Noto Sans Kannada");
MapScriptToTypefaces["kali"].Insert(0, "Noto Sans KayahLi");
MapScriptToTypefaces["khar"].Insert(0, "Noto Sans Kharoshthi");
MapScriptToTypefaces["khmr"].Insert(0, "Noto Sans Khmer");
MapScriptToTypefaces["khoj"].Insert(0, "Noto Sans Khojki");
MapScriptToTypefaces["laoo"].Insert(0, "Noto Sans Lao");
MapScriptToTypefaces["lepc"].Insert(0, "Noto Sans Lepcha");
MapScriptToTypefaces["limb"].Insert(0, "Noto Sans Limbu");
MapScriptToTypefaces["lina"].Insert(0, "Noto Sans Linear A");
MapScriptToTypefaces["linb"].Insert(0, "Noto Sans Linear B");
MapScriptToTypefaces["lisu"].Insert(0, "Noto Sans Lisu");
MapScriptToTypefaces["lyci"].Insert(0, "Noto Sans Lycian");
MapScriptToTypefaces["lydi"].Insert(0, "Noto Sans Lydian");
MapScriptToTypefaces["mlym"].Insert(0, "Noto Sans Malayalam");
MapScriptToTypefaces["mand"].Insert(0, "Noto Sans Mandiac");
MapScriptToTypefaces["mani"].Insert(0, "Noto Sans Manichaean");
MapScriptToTypefaces["marc"].Insert(0, "Noto Sans Marchen");
MapScriptToTypefaces["gonm"].Insert(0, "Noto Sans Masaram Gondi");
MapScriptToTypefaces["medf"].Insert(0, "Noto Sans Medefaidrin");
MapScriptToTypefaces["mtei"].Insert(0, "Noto Sans Meetei Mayek");
MapScriptToTypefaces["merc"].Insert(0, "Noto Sans Meroitic");
MapScriptToTypefaces["mero"].Insert(0, "Noto Sans Meroitic");
MapScriptToTypefaces["plrd"].Insert(0, "Noto Sans Miao");
MapScriptToTypefaces["modi"].Insert(0, "Noto Sans Modi");
MapScriptToTypefaces["mong"].Insert(0, "Noto Sans Mongolian");
MapScriptToTypefaces["mroo"].Insert(0, "Noto Sans Mro");
MapScriptToTypefaces["mult"].Insert(0, "Noto Sans Multani");
MapScriptToTypefaces["mymr"].Insert(0, "Noto Sans Myanmar");
MapScriptToTypefaces["nkoo"].Insert(0, "Noto Sans Nko");
MapScriptToTypefaces["nbat"].Insert(0, "Noto Sans Nabataean");
MapScriptToTypefaces["talu"].Insert(0, "Noto Sans New Tai Lue");
MapScriptToTypefaces["newa"].Insert(0, "Noto Sans Newa");
MapScriptToTypefaces["ogam"].Insert(0, "Noto Sans Ogham");
MapScriptToTypefaces["olck"].Insert(0, "Noto Sans Ol Chiki");
MapScriptToTypefaces["ital"].Insert(0, "Noto Sans Old Italian");
MapScriptToTypefaces["narb"].Insert(0, "Noto Sans Old North Arabian");
MapScriptToTypefaces["perm"].Insert(0, "Noto Sans Old Permic");
MapScriptToTypefaces["xpeo"].Insert(0, "Noto Sans Old Persian");
MapScriptToTypefaces["sarb"].Insert(0, "Noto Sans Old South Arabian");
MapScriptToTypefaces["orkh"].Insert(0, "Noto Sans Old Turkic");
MapScriptToTypefaces["orya"].Insert(0, "Noto Sans Oriya");
MapScriptToTypefaces["osge"].Insert(0, "Noto Sans Osage");
MapScriptToTypefaces["osma"].Insert(0, "Noto Sans Osmanya");
MapScriptToTypefaces["hmng"].Insert(0, "Noto Sans Pahawh Hmong");
MapScriptToTypefaces["palm"].Insert(0, "Noto Sans Palmyrene");
MapScriptToTypefaces["pauc"].Insert(0, "Noto Sans Pau Cin Hau");
MapScriptToTypefaces["phag"].Insert(0, "Noto Sans Phags Pa");
MapScriptToTypefaces["phnx"].Insert(0, "Noto Sans Phoenician");
MapScriptToTypefaces["rjng"].Insert(0, "Noto Sans Rejang");
MapScriptToTypefaces["runr"].Insert(0, "Noto Sans Runic");
MapScriptToTypefaces["samr"].Insert(0, "Noto Sans Samaritan");
MapScriptToTypefaces["saur"].Insert(0, "Noto Sans Saurashtra");
MapScriptToTypefaces["shrd"].Insert(0, "Noto Sans Sharada");
MapScriptToTypefaces["shaw"].Insert(0, "Noto Sans Shavian");
MapScriptToTypefaces["sinh"].Insert(0, "Noto Sans Sinhala");
MapScriptToTypefaces["sora"].Insert(0, "Noto Sans Sora Sompeng");
MapScriptToTypefaces["soyo"].Insert(0, "Noto Sans Soyombo");
MapScriptToTypefaces["sund"].Insert(0, "Noto Sans Sundanese");
MapScriptToTypefaces["sylo"].Insert(0, "Noto Sans Syloti Nagri");
MapScriptToTypefaces["zsym"].Insert(0, "Noto Sans Symbols");
MapScriptToTypefaces["syrn"].Insert(0, "Noto Sans Syriac Eastern");
MapScriptToTypefaces["syre"].Insert(0, "Noto Sans Syriac Estrangela");
MapScriptToTypefaces["syrj"].Insert(0, "Noto Sans Syriac Western");
MapScriptToTypefaces["tglg"].Insert(0, "Noto Sans Tagalog");
MapScriptToTypefaces["tagb"].Insert(0, "Noto Sans Tagbanwa");
MapScriptToTypefaces["tale"].Insert(0, "Noto Sans Tai Le");
MapScriptToTypefaces["lana"].Insert(0, "Noto Sans Tai Tham");
MapScriptToTypefaces["tavt"].Insert(0, "Noto Sans Tai Viet");
MapScriptToTypefaces["takr"].Insert(0, "Noto Sans Takri");
MapScriptToTypefaces["taml"].Insert(0, "Noto Sans Tamil");
MapScriptToTypefaces["telu"].Insert(0, "Noto Sans Telugu");
MapScriptToTypefaces["thaa"].Insert(0, "Noto Sans Thaana");
MapScriptToTypefaces["thai"].Insert(0, "Noto Sans Thai");
MapScriptToTypefaces["tfng"].Insert(0, "Noto Sans Tifinagh");
MapScriptToTypefaces["ugar"].Insert(0, "Noto Sans Ugaritic");
MapScriptToTypefaces["vaii"].Insert(0, "Noto Sans Vai");
MapScriptToTypefaces["wcho"].Insert(0, "Noto Sans Wancho");
MapScriptToTypefaces["wara"].Insert(0, "Noto Sans Warang Citi");
MapScriptToTypefaces["yiii"].Insert(0, "Noto Sans Yi");
}
public FallbackListFontMatcher(FontManager manager) : base(manager) { }
public override IEnumerable<Typeface> MatchScript(string script = null, bool distinctFamily = false) {
if (string.IsNullOrEmpty(script)) script = ScriptUtils.UltimateFallbackScript;
List<string> candidates;
IEnumerable<string> candidateScripts = new string[] { script };
while (candidateScripts != null) {
foreach (var candidateScript in candidateScripts) {
if (MapScriptToTypefaces.TryGetValue(candidateScript, out candidates)) {
foreach (var candidate in candidates) {
IReadOnlyCollection<Typeface> typefaces1;
if (Manager.MapFullNameToTypeface.TryGetValue(candidate, out typefaces1)) {
foreach (var typeface in typefaces1) {
yield return typeface;
}
}
if (distinctFamily) continue;
IReadOnlyCollection<Typeface> typefaces2;
if (Manager.MapNameToTypefaces.TryGetValue(candidate, out typefaces2)) {
foreach (var typeface in typefaces2) {
if (typefaces1.Contains(typeface)) continue;
yield return typeface;
}
}
}
IEnumerable<Typeface> EnumerateTypefaces(List<string> candidates, bool distinctFamily) {
foreach (var candidate in candidates) {
if (Manager.MapFullNameToTypeface.TryGetValue(candidate, out var typeface1)) {
yield return typeface1;
}
if (distinctFamily) continue;
if (Manager.MapNameToTypefaces.TryGetValue(candidate, out IReadOnlyCollection<Typeface> typefaces2)) {
foreach (var typeface in typefaces2) {
if (typeface1 == typeface) continue;
yield return typeface;
}
}
candidateScripts = ScriptUtils.EnumerateFallbackScripts(script);
}
}
}

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
#pragma warning disable IDE0049
namespace Cryville.Common.Font {
public abstract class FontTable<T> {
protected UInt32 Offset { get; private set; }
@@ -24,15 +25,18 @@ namespace Cryville.Common.Font {
readonly UInt16 majorVersion;
readonly UInt16 minorVersion;
readonly UInt32 numFonts;
readonly List<UInt32> tableDirectoryOffsets = new List<UInt32>();
readonly List<UInt32> tableDirectoryOffsets = new();
#pragma warning disable IDE0052 // Reserved
readonly String dsigTag;
readonly UInt32 dsigLength;
readonly UInt32 dsigOffset;
#pragma warning restore IDE0052 // Reserved
public TTCHeader(BinaryReader reader, UInt32 offset) : base(reader, offset) {
ttcTag = reader.ReadTag();
if (ttcTag != "ttcf") throw new NotImplementedException();
if (ttcTag != "ttcf") throw new NotSupportedException();
majorVersion = reader.ReadUInt16();
minorVersion = reader.ReadUInt16();
if (minorVersion != 0) throw new NotSupportedException();
numFonts = reader.ReadUInt32();
for (UInt32 i = 0; i < numFonts; i++) tableDirectoryOffsets.Add(reader.ReadUInt32());
if (majorVersion == 2) {
@@ -52,12 +56,16 @@ namespace Cryville.Common.Font {
public sealed class TableDirectory : FontTable<TableRecord, object> {
readonly UInt32 sfntVersion;
readonly UInt16 numTables;
#pragma warning disable IDE0052 // Reserved
readonly UInt16 searchRange;
readonly UInt16 entrySelector;
readonly UInt16 rangeShift;
readonly List<TableRecord> tableRecords = new List<TableRecord>();
#pragma warning restore IDE0052 // Reserved
readonly List<TableRecord> tableRecords = new();
public TableDirectory(BinaryReader reader, UInt32 offset) : base(reader, offset) {
sfntVersion = reader.ReadUInt32();
if (sfntVersion != 0x00010000 && sfntVersion != 0x4F54544F &&
sfntVersion != 0x74727565 && sfntVersion != 0x74797031) throw new NotSupportedException();
numTables = reader.ReadUInt16();
searchRange = reader.ReadUInt16();
entrySelector = reader.ReadUInt16();
@@ -73,13 +81,11 @@ namespace Cryville.Common.Font {
public override IReadOnlyList<TableRecord> GetItems() {
return tableRecords;
}
public override object GetSubTable(TableRecord item) {
switch (item.tableTag) {
case "name": return new NameTable(Reader, item.offset);
case "meta": return new MetaTable(Reader, item.offset);
default: throw new NotImplementedException();
}
}
public override object GetSubTable(TableRecord item) => item.tableTag switch {
"name" => new NameTable(Reader, item.offset),
"meta" => new MetaTable(Reader, item.offset),
_ => throw new NotImplementedException(),
};
}
public struct TableRecord {
public string tableTag;
@@ -91,56 +97,71 @@ namespace Cryville.Common.Font {
readonly UInt16 version;
readonly UInt16 count;
readonly UInt16 storageOffset;
readonly List<NameRecord> nameRecord = new List<NameRecord>();
readonly List<NameRecord> nameRecord = new();
readonly UInt16 langTagCount;
readonly List<LangTagRecord> langTagRecord = new List<LangTagRecord>();
readonly List<LangTagRecord> langTagRecord = new();
public NameTable(BinaryReader reader, UInt32 offset) : base(reader, offset) {
version = reader.ReadUInt16();
count = reader.ReadUInt16();
storageOffset = reader.ReadUInt16();
for (UInt16 i = 0; i < count; i++)
nameRecord.Add(new NameRecord {
platformID = reader.ReadUInt16(),
encodingID = reader.ReadUInt16(),
languageID = reader.ReadUInt16(),
nameID = (NameID)reader.ReadUInt16(),
length = reader.ReadUInt16(),
stringOffset = reader.ReadUInt16(),
});
nameRecord.Add(new NameRecord(
reader.ReadUInt16(),
reader.ReadUInt16(),
reader.ReadUInt16(),
(NameID)reader.ReadUInt16(),
reader.ReadUInt16(),
reader.ReadUInt16()
));
if (version == 1) {
langTagCount = reader.ReadUInt16();
for (UInt16 i = 0; i < langTagCount; i++)
langTagRecord.Add(new LangTagRecord {
length = reader.ReadUInt16(),
langTagOffset = reader.ReadUInt16(),
});
langTagRecord.Add(new LangTagRecord(
reader.ReadUInt16(),
reader.ReadUInt16()
));
}
foreach (var i in nameRecord)
i.Load(reader, offset + storageOffset);
if (version == 1) {
foreach (var i in langTagRecord)
i.Load(reader, offset + storageOffset);
}
UInt32 origin = (UInt32)reader.BaseStream.Position;
for (int i = 0; i < nameRecord.Count; i++) nameRecord[i] = nameRecord[i].Load(reader, origin);
for (int i = 0; i < langTagRecord.Count; i++) langTagRecord[i] = langTagRecord[i].Load(reader, origin);
}
public sealed override IReadOnlyList<NameRecord> GetItems() {
return nameRecord;
}
}
public struct NameRecord {
public UInt16 platformID;
public UInt16 encodingID;
public UInt16 languageID;
public NameID nameID;
public UInt16 length;
public UInt16 stringOffset;
public String value { get; private set; }
public NameRecord Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + stringOffset;
public class NameRecord {
public UInt16 PlatformID { get; private set; }
public UInt16 EncodingID { get; private set; }
public UInt16 LanguageID { get; private set; }
public NameID NameID { get; private set; }
public UInt16 Length { get; private set; }
public UInt16 StringOffset { get; private set; }
public String Value { get; private set; }
public NameRecord(UInt16 platformID, UInt16 encodingID, UInt16 languageID, NameID nameID, UInt16 length, UInt16 stringOffset) {
PlatformID = platformID;
EncodingID = encodingID;
LanguageID = languageID;
NameID = nameID;
Length = length;
StringOffset = stringOffset;
}
public void Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + StringOffset;
Encoding encoding;
switch (platformID) {
case 0: encoding = Encoding.BigEndianUnicode; break;
case 3: encoding = Encoding.BigEndianUnicode; break;
default: return this;
try {
switch (PlatformID) {
case 0: encoding = Encoding.BigEndianUnicode; break;
case 1: encoding = Encoding.GetEncoding(10000 + EncodingID); break;
case 3: encoding = Encoding.BigEndianUnicode; break;
default: return;
}
}
value = encoding.GetString(reader.ReadBytes(length));
return this;
catch (NotSupportedException) { return; }
catch (ArgumentException) { return; }
Value = encoding.GetString(reader.ReadBytes(Length));
}
}
public enum NameID : UInt16 {
@@ -171,47 +192,58 @@ namespace Cryville.Common.Font {
DarkBackgroundPalette = 24,
VariationsPostScriptNamePrefix = 25,
}
public struct LangTagRecord {
public UInt16 length;
public UInt16 langTagOffset;
public String value { get; private set; }
public LangTagRecord Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + langTagOffset;
value = Encoding.BigEndianUnicode.GetString(reader.ReadBytes(length));
return this;
public class LangTagRecord {
public UInt16 Length { get; private set; }
public UInt16 LangTagOffset { get; private set; }
public String Value { get; private set; }
public LangTagRecord(UInt16 length, UInt16 langTagOffset) {
Length = length;
LangTagOffset = langTagOffset;
}
public void Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + LangTagOffset;
Value = Encoding.BigEndianUnicode.GetString(reader.ReadBytes(Length));
}
}
public sealed class MetaTable : FontTable<DataMap> {
readonly UInt32 version;
#pragma warning disable IDE0052 // Reserved
readonly UInt32 flags;
#pragma warning restore IDE0052 // Reserved
readonly UInt32 dataMapCount;
readonly List<DataMap> dataMaps = new List<DataMap>();
readonly List<DataMap> dataMaps = new();
public MetaTable(BinaryReader reader, UInt32 offset) : base(reader, offset) {
version = reader.ReadUInt32();
if (version != 1) throw new NotSupportedException();
flags = reader.ReadUInt32();
reader.ReadUInt32();
dataMapCount = reader.ReadUInt32();
for (UInt32 i = 0; i < dataMapCount; i++)
dataMaps.Add(new DataMap {
tag = reader.ReadTag(),
dataOffset = reader.ReadUInt32(),
dataLength = reader.ReadUInt32(),
});
for (int i = 0; i < dataMaps.Count; i++) dataMaps[i] = dataMaps[i].Load(reader, offset);
dataMaps.Add(new DataMap (
reader.ReadTag(),
reader.ReadUInt32(),
reader.ReadUInt32()
));
foreach (var i in dataMaps)
i.Load(reader, offset);
}
public sealed override IReadOnlyList<DataMap> GetItems() {
return dataMaps;
}
}
public struct DataMap {
public String tag;
public UInt32 dataOffset;
public UInt32 dataLength;
public String value { get; private set; }
public DataMap Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + dataOffset;
value = Encoding.ASCII.GetString(reader.ReadBytes((int)dataLength));
return this;
public class DataMap {
public String Tag { get; private set; }
public UInt32 DataOffset { get; private set; }
public UInt32 DataLength { get; private set; }
public String Value { get; private set; }
public DataMap(String tag, UInt32 dataOffset, UInt32 dataLength) {
Tag = tag;
DataOffset = dataOffset;
DataLength = dataLength;
}
public void Load(BinaryReader reader, UInt32 origin) {
reader.BaseStream.Position = origin + DataOffset;
Value = Encoding.ASCII.GetString(reader.ReadBytes((int)DataLength));
}
}
public static class BinaryReaderExtensions {

View File

@@ -23,9 +23,9 @@ namespace Cryville.Common.Font {
protected override void GetName(BinaryReader reader) {
var dir = new TableDirectory(reader, (uint)reader.BaseStream.Position);
var nameTable = (NameTable)dir.GetSubTable((from i in dir.GetItems() where i.tableTag == "name" select i).Single());
FamilyName = (from i in nameTable.GetItems() where i.nameID == NameID.FontFamilyName && i.value != null select i.value).First();
SubfamilyName = (from i in nameTable.GetItems() where i.nameID == NameID.FontSubfamilyName && i.value != null select i.value).First();
FullName = (from i in nameTable.GetItems() where i.nameID == NameID.FullFontName && i.value != null select i.value).First();
FamilyName = (from i in nameTable.GetItems() where i.NameID == NameID.FontFamilyName && i.Value != null select i.Value).First();
SubfamilyName = (from i in nameTable.GetItems() where i.NameID == NameID.FontSubfamilyName && i.Value != null select i.Value).First();
FullName = (from i in nameTable.GetItems() where i.NameID == NameID.FullFontName && i.Value != null select i.Value).First();
}
}
}

View File

@@ -25,7 +25,7 @@ namespace Cryville.Common {
/// <param name="encoding">The encoding of the string.</param>
/// <returns>The string read from the reader.</returns>
public static string ReadUInt16String(this BinaryReader reader, Encoding encoding = null) {
if (encoding == null) encoding = Encoding.UTF8;
encoding ??= Encoding.UTF8;
var len = reader.ReadUInt16();
byte[] buffer = reader.ReadBytes(len);
return encoding.GetString(buffer);
@@ -38,7 +38,7 @@ namespace Cryville.Common {
/// <param name="value">The string to write by the writer.</param>
/// <param name="encoding">The encoding of the string.</param>
public static void WriteUInt16String(this BinaryWriter writer, string value, Encoding encoding = null) {
if (encoding == null) encoding = Encoding.UTF8;
encoding ??= Encoding.UTF8;
byte[] buffer = encoding.GetBytes(value);
writer.Write((ushort)buffer.Length);
writer.Write(buffer);

View File

@@ -2,26 +2,26 @@ using System;
namespace Cryville.Common {
public struct Identifier : IEquatable<Identifier> {
public static Identifier Empty = new Identifier(0);
public static Identifier Empty = new(0);
public int Key { get; private set; }
public object Name { get { return IdentifierManager.Shared.Retrieve(Key); } }
public readonly object Name => IdentifierManager.Shared.Retrieve(Key);
public Identifier(int key) {
Key = key;
}
public Identifier(object name) {
Key = IdentifierManager.Shared.Request(name);
}
public override bool Equals(object obj) {
if (obj == null || !(obj is Identifier)) return false;
return Equals((Identifier)obj);
public override readonly bool Equals(object obj) {
if (obj == null || obj is not Identifier other) return false;
return Equals(other);
}
public bool Equals(Identifier other) {
public readonly bool Equals(Identifier other) {
return Key == other.Key;
}
public override int GetHashCode() {
public override readonly int GetHashCode() {
return Key;
}
public override string ToString() {
public override readonly string ToString() {
if (Key == 0) return "";
return Name.ToString();
}

View File

@@ -42,13 +42,13 @@ namespace Cryville.Common.Math {
}
}
/// <summary>
/// Performs dot operation with a <see cref="System.Single" /> column vector.
/// Performs dot operation with a <see cref="float" /> column vector.
/// </summary>
/// <param name="lhs">The lefthand column vector.</param>
/// <param name="o">The vector operator.</param>
/// <returns>The result of the dot operation.</returns>
public T Dot(ColumnVector<float> lhs, IVectorOperator<T> o) {
T res = default(T);
T res = default;
for (var i = 0; i < Size; i++)
res = o.Add(res, o.ScalarMultiply(lhs[i], content[i]));
return res;

View File

@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: f8303a3eeefeacf4ca0c02b5d32e0cff
folderAsset: yes
timeCreated: 1621071543
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,157 +0,0 @@
using Cryville.Common.Logging;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
namespace Cryville.Common.Network {
public class HttpClient {
private readonly string _directHost;
protected string DirectHost { get { return _directHost; } }
private readonly int _directPort;
protected int DirectPort { get { return _directPort; } }
readonly Uri _baseUri;
readonly int origPort;
protected string Version = "HTTP/1.1";
protected TcpClient TcpClient { get; private set; }
protected Stream RawTcpStream {
get {
return TcpClient.GetStream();
}
}
protected virtual Stream Stream {
get {
return TcpClient.GetStream();
}
}
protected virtual string WindowsProxyProtocolName {
get {
return "http";
}
}
private readonly bool _proxied = false;
public Dictionary<string, string> Headers { get; set; }
public HttpClient(Uri baseUri, int port = 80) {
_directHost = baseUri.Host;
_directPort = port;
_baseUri = baseUri;
origPort = _baseUri.Port;
Headers = new Dictionary<string, string>();
_proxied = GetProxy(ref _directHost, ref _directPort);
Logger.Log("main", 0, "Network", "Connecting to {0}:{1}", DirectHost, DirectPort);
TcpClient = new TcpClient(DirectHost, DirectPort);
}
public virtual void Connect() {
if (_proxied) {
Request(RawTcpStream, "CONNECT", string.Format(CultureInfo.InvariantCulture, "{0}:{1}", _baseUri.Host, origPort));
}
}
public virtual void Close() {
TcpClient.Close();
}
public HttpResponse Request(string method, Uri uri, string body = null, Encoding encoding = null) {
string struri = GetUri(uri).PathAndQuery;
return Request(Stream, method, struri, body, encoding);
}
public HttpResponse Request(Stream stream, string method, string uri, string body = null, Encoding encoding = null) {
var headers = new Dictionary<string, string>();
foreach (var h in Headers)
headers.Add(h.Key, h.Value);
headers["Host"] = _baseUri.Host;
byte[] payload = new byte[0];
if (body != null) {
if (encoding == null)
encoding = Encoding.UTF8;
payload = encoding.GetBytes(body);
headers.Add("Content-Encoding", encoding.EncodingName);
headers.Add("Content-Length", payload.Length.ToString(CultureInfo.InvariantCulture));
}
string request_line = string.Format(
"{0} {1} {2}\r\n", method, uri, Version
);
string header_fields = string.Concat((
from h in headers select h.Key + ":" + h.Value + "\r\n"
).ToArray());
byte[] buffer0 = Encoding.ASCII.GetBytes(string.Format(
"{0}{1}\r\n", request_line, header_fields
));
byte[] buffer1 = new byte[buffer0.Length + payload.Length];
Array.Copy(buffer0, buffer1, buffer0.Length);
Array.Copy(payload, 0, buffer1, buffer0.Length, payload.Length);
Logger.Log("main", 0, "Network", Encoding.UTF8.GetString(buffer1));
stream.Write(buffer1, 0, buffer1.Length);
stream.Flush();
var response = new HttpResponse(stream);
Logger.Log("main", 0, "Network", "{0}", response);
return response;
}
protected bool GetProxy(ref string host, ref int port) {
// TODO use winhttp.dll
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
var reg = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings");
var proxyEnable = (int)reg.GetValue("ProxyEnable");
if (proxyEnable == 0) return false;
var proxyStr = (string)reg.GetValue("ProxyServer");
if (!string.IsNullOrEmpty(proxyStr)) {
string[] proxies = proxyStr.Split(';');
foreach (var p in proxies) {
if (!p.Contains('=')) {
string[] s = p.Split(':');
host = s[0];
port = int.Parse(s[1]);
return true;
}
else if (p.StartsWith(WindowsProxyProtocolName + "=")) {
string[] s = p.Split('=', ':');
host = s[1];
port = int.Parse(s[2]);
return true;
}
}
}
}
return false;
}
protected Uri GetUri(string path) {
Uri address;
if (_baseUri != null) {
if (!Uri.TryCreate(_baseUri, path, out address)) {
return new Uri(Path.GetFullPath(path));
}
}
else {
if (!Uri.TryCreate(path, UriKind.Absolute, out address)) {
return new Uri(Path.GetFullPath(path));
}
}
return GetUri(address);
}
protected Uri GetUri(Uri address) {
if (address == null) {
throw new ArgumentNullException("address");
}
Uri uri = address;
if (!address.IsAbsoluteUri && _baseUri != null && !Uri.TryCreate(_baseUri, address, out uri)) {
return address;
}
return uri;
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 5ea931bf5488011468f3d1243a038874
timeCreated: 1622589817
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,62 +0,0 @@
using Cryville.Common.Logging;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Cryville.Common.Network {
public class HttpResponse {
static readonly char[] spchar = new char[]{ ' ' };
public string HttpVersion { get; private set; }
public string StatusCode { get; private set; }
public string ReasonPhase { get; private set; }
public Dictionary<string, string> Headers { get; private set; }
public HttpResponseStream MessageBody { get; private set; }
internal HttpResponse(Stream stream) {
var reader = new BinaryReader(stream, Encoding.ASCII);
var statu_line = ReadLine(reader).Split(spchar, 3);
HttpVersion = statu_line[0];
StatusCode = statu_line[1];
ReasonPhase = statu_line[2];
Logger.Log("main", 0, "Network", "Receive Response: {0} {1} {2}", HttpVersion, StatusCode, ReasonPhase);
Headers = new Dictionary<string, string>();
while (ParseHeader(reader, Headers)) ;
if (Headers.ContainsKey("content-length")) {
int length = int.Parse(Headers["content-length"]);
MessageBody = new HttpResponseBlockStream(reader, length);
}
else if (Headers.ContainsKey("transfer-encoding") && Headers["transfer-encoding"] == "chunked") {
MessageBody = new HttpResponseChunkedStream(reader);
}
}
public override string ToString() {
return string.Format("<{0} {1} {2}>", HttpVersion, StatusCode, ReasonPhase);
}
internal static bool ParseHeader(BinaryReader reader, Dictionary<string, string> headers) {
// TODO Multiline header
var header = ReadLine(reader);
if (header == "") return false;
var s = header.Split(':');
string field_name = s[0].Trim().ToLower();
string field_value = s[1].Trim();
if (headers.ContainsKey(field_name)) headers[field_name] += "," + field_value;
else headers.Add(field_name, field_value);
Logger.Log("main", 0, "Network", "Receive Header {0}: {1}", field_name, field_value);
return true;
}
internal static string ReadLine(BinaryReader reader) {
StringBuilder result = new StringBuilder();
char c;
while (true) {
c = reader.ReadChar();
if (c == '\r') break;
result.Append(c);
}
// TODO Unseekable
reader.ReadByte();
return result.ToString();
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 07e8215a93e3eb1418685009f0c58dcd
timeCreated: 1622596274
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,134 +0,0 @@
using Cryville.Common.Logging;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
namespace Cryville.Common.Network {
public abstract class HttpResponseStream : Stream {
public override bool CanRead { get { return true; } }
public override bool CanSeek { get { return false; } }
public override bool CanWrite { get { return false; } }
public override long Length { get { throw new NotSupportedException(); } }
public override long Position {
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
}
public override void Flush() { }
public abstract byte[] ReadToEnd();
public override long Seek(long offset, SeekOrigin origin) {
throw new NotSupportedException();
}
public override void SetLength(long value) {
throw new NotSupportedException();
}
public override void Write(byte[] buffer, int offset, int count) {
throw new NotSupportedException();
}
}
internal sealed class HttpResponseBlockStream : HttpResponseStream {
readonly BinaryReader _reader;
readonly int _length;
int _pos = 0;
internal HttpResponseBlockStream(BinaryReader reader, int length) {
_reader = reader;
_length = length;
}
public override int Read(byte[] buffer, int offset, int count) {
int recv = 0;
int recv_len = System.Math.Min(count, _length - _pos);
if (recv_len == 0) return 0;
while (recv < recv_len) {
recv += _reader.Read(buffer, offset + recv, count - recv);
Logger.Log("main", 0, "Network", "Message body received: {0}/{1}/{2}", recv, recv_len, _length);
}
_pos += recv_len;
return recv_len;
}
public override byte[] ReadToEnd() {
byte[] buffer = new byte[_length - _pos];
Read(buffer, 0, buffer.Length);
return buffer;
}
}
internal sealed class HttpResponseChunkedStream : HttpResponseStream {
readonly BinaryReader _reader;
byte[] _chunk = null;
int _pos = 0;
internal HttpResponseChunkedStream(BinaryReader reader) {
_reader = reader;
ReadChunk();
}
public void ReadChunk() {
if (_chunk != null && _chunk.Length == 0) return;
string[] chunkHeader = HttpResponse.ReadLine(_reader).Split(';');
// int chunkSize = Array.IndexOf(LEN, chunkHeader[0].ToLower()[0]);
int chunkSize = int.Parse(chunkHeader[0], NumberStyles.HexNumber);
if (chunkSize == -1)
throw new IOException("Corrupted chunk received");
if (chunkSize == 0) {
_chunk = new byte[0];
// TODO TE Header, now just discard
var headers = new Dictionary<string, string>();
while (HttpResponse.ParseHeader(_reader, headers)) ;
return;
}
_chunk = new byte[chunkSize];
int recv = 0;
while (recv < chunkSize) {
recv += _reader.Read(_chunk, recv, chunkSize - recv);
Logger.Log("main", 0, "Network", "Message chunk received: {0}/{1}", recv, chunkSize);
}
_pos = 0;
if (HttpResponse.ReadLine(_reader) != "")
throw new IOException("Corrupted chunk received");
}
public override int Read(byte[] buffer, int offset, int count) {
if (_chunk.Length == 0) return 0;
int recv = 0;
while (true) {
if (count - recv <= _chunk.Length - _pos) break;
Array.Copy(_chunk, _pos, buffer, recv, _chunk.Length - _pos);
recv += _chunk.Length - _pos;
ReadChunk();
if (_chunk.Length == 0) return recv;
}
Array.Copy(_chunk, _pos, buffer, recv, count - recv);
return count;
}
public override byte[] ReadToEnd() {
if (_chunk.Length == 0) return new byte[0];
List<byte[]> segs = new List<byte[]>();
while (true) {
if (_pos != 0) {
var buffer = new byte[_chunk.Length - _pos];
Array.Copy(_chunk, _pos, buffer, 0, buffer.Length);
segs.Add(buffer);
}
else segs.Add(_chunk);
ReadChunk();
if (_chunk.Length == 0) {
var result = new byte[segs.Sum(i => i.Length)];
int p = 0;
foreach (var i in segs) {
Array.Copy(i, 0, result, p, i.Length);
p += i.Length;
}
return result;
}
}
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: f191de447a708da4f9d230e6545ce0a6
timeCreated: 1635470462
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,33 +0,0 @@
using System;
using System.IO;
namespace Cryville.Common.Network {
public class HttpsClient : HttpClient {
readonly TlsClient _tlsClient;
protected override Stream Stream {
get {
return _tlsClient.Stream;
}
}
protected override string WindowsProxyProtocolName {
get {
return "https";
}
}
public HttpsClient(Uri baseUri) : base(baseUri, 443) {
_tlsClient = new TlsClient(RawTcpStream, baseUri.Host);
}
public override void Connect() {
base.Connect();
_tlsClient.Connect();
}
public override void Close() {
_tlsClient.Close();
base.Close();
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 9b35290e0e147a342acc29a20c8fceaf
timeCreated: 1622503538
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,99 +0,0 @@
using Cryville.Common.Logging;
using Org.BouncyCastle.Security;
using Org.BouncyCastle.Tls;
using Org.BouncyCastle.Tls.Crypto;
using Org.BouncyCastle.Tls.Crypto.Impl.BC;
using System.Collections;
using System.IO;
using System.Linq;
using System.Text;
using BcTlsClient = Org.BouncyCastle.Tls.TlsClient;
namespace Cryville.Common.Network {
public class TlsClient {
readonly TlsClientProtocol _protocol;
readonly BcTlsClient _tlsClient;
public Stream Stream { get; private set; }
public TlsClient(Stream baseStream, string hostname) {
_protocol = new TlsClientProtocol(baseStream);
_tlsClient = new InternalTlsClient(hostname, new BcTlsCrypto(new SecureRandom()));
}
public void Connect() {
_protocol.Connect(_tlsClient);
Stream = _protocol.Stream;
}
public void Close() {
_protocol.Close();
}
private class InternalTlsClient : DefaultTlsClient {
readonly string _host;
public InternalTlsClient(string host, TlsCrypto crypto) : base(crypto) {
_host = host;
}
protected override ProtocolVersion[] GetSupportedVersions() {
return ProtocolVersion.TLSv13.DownTo(ProtocolVersion.TLSv12);
}
protected override IList GetProtocolNames() {
IList list = new ArrayList {
ProtocolName.Http_1_1
};
return list;
}
private static readonly int[] supportedCipherSuites = {
CipherSuite.TLS_AES_128_GCM_SHA256,
CipherSuite.TLS_AES_256_GCM_SHA384,
CipherSuite.TLS_CHACHA20_POLY1305_SHA256,
CipherSuite.TLS_AES_128_CCM_SHA256,
CipherSuite.TLS_AES_128_CCM_8_SHA256,
};
protected override int[] GetSupportedCipherSuites() {
return base.GetSupportedCipherSuites().Union(supportedCipherSuites).ToArray();
}
protected override IList GetSupportedSignatureAlgorithms() {
var result = base.GetSupportedSignatureAlgorithms();
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP256r1tls13_sha256);
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP384r1tls13_sha384);
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP512r1tls13_sha512);
return result;
}
protected override IList GetSniServerNames() {
return new ArrayList { new ServerName(0, Encoding.ASCII.GetBytes(_host)) };
}
public override TlsAuthentication GetAuthentication() {
return new NullTlsAuthentication();
}
public override void NotifyAlertReceived(short alertLevel, short alertDescription) {
Logger.Log("main", 0, "Network/TLS", "TLS Alert {0} {1}", alertLevel, alertDescription);
}
public override void NotifyServerVersion(ProtocolVersion serverVersion) {
base.NotifyServerVersion(serverVersion);
Logger.Log("main", 0, "Network/TLS", "NotifyServerVersion {0}", serverVersion);
}
public override void NotifySelectedCipherSuite(int selectedCipherSuite) {
base.NotifySelectedCipherSuite(selectedCipherSuite);
Logger.Log("main", 0, "Network/TLS", "NotifySelectedCipherSuite {0}", selectedCipherSuite);
}
}
private class NullTlsAuthentication : TlsAuthentication {
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest) {
return null;
}
public void NotifyServerCertificate(TlsServerCertificate serverCertificate) { }
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: c9c242bb90fc1cc479a8df1407f21940
timeCreated: 1622021660
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -24,8 +24,8 @@ namespace Cryville.Common.Pdt {
/// <param name="exp">The expression to evaluate.</param>
/// <returns>Whether the evaluaton succeeded.</returns>
public bool Evaluate(PdtOperator target, PdtExpression exp) {
var prevFrameCount = _framecount;
try {
var prevFrameCount = _framecount;
_revokepttconst = false;
for (var ip = exp.Instructions.First; ip != null; ip = ip.Next)
ip.Value.Execute(this, ref ip);
@@ -33,12 +33,14 @@ namespace Cryville.Common.Pdt {
exp.IsConstant = exp.IsPotentialConstant = !_revokepttconst;
}
var ret = Operate(target, _framecount - prevFrameCount, true);
for (var i = prevFrameCount; i < _framecount; i++) DiscardStack();
return ret;
}
catch (Exception ex) {
throw new EvaluationFailureException(exp, ex);
}
finally {
for (var i = prevFrameCount; i < _framecount; i++) DiscardStack();
}
}
/// <summary>
/// Optimizes an expression by merging its instructions.
@@ -54,9 +56,9 @@ namespace Cryville.Common.Pdt {
while (ip != null) {
bool nextFlag = false;
var i = ip.Value;
if (i is PdtInstruction.Operate) {
if (i is PdtInstruction.Operate iop) {
int fc0 = _framecount;
int fc1 = ((PdtInstruction.Operate)i).Signature.ParamCount;
int fc1 = iop.Signature.ParamCount;
try { i.Execute(this, ref ip); } catch (Exception) { }
if (fc0 - _framecount == fc1) {
unsafe {
@@ -75,8 +77,7 @@ namespace Cryville.Common.Pdt {
}
}
}
else if (i is PdtInstruction.Collapse) {
var t = (PdtInstruction.Collapse)i;
else if (i is PdtInstruction.Collapse t) {
try {
var pins = ip;
i.Execute(this, ref ip);
@@ -131,18 +132,14 @@ namespace Cryville.Common.Pdt {
exp.IsConstant = true;
exp.IsPotentialConstant = true;
for (var ins = il.First; ins != null; ins = ins.Next) {
if (!(ins.Value is PdtInstruction.PushConstant)) {
if (ins.Value is not PdtInstruction.PushConstant) {
exp.IsConstant = false;
}
else if (!(ins.Value is PdtInstruction.PushVariable)) {
exp.IsPotentialConstant = false;
return;
break;
}
}
}
void ReplaceIP(LinkedList<PdtInstruction> il, ref LinkedListNode<PdtInstruction> ip, PdtInstruction ins, Dictionary<LinkedListNode<PdtInstruction>, List<PdtInstruction.Collapse>> cols) {
List<PdtInstruction.Collapse> cins;
if (cols.TryGetValue(ip, out cins)) cols.Remove(ip);
if (cols.TryGetValue(ip, out List<PdtInstruction.Collapse> cins)) cols.Remove(ip);
ip = il.AddAfter(ip, ins);
il.Remove(ip.Previous);
if (cins != null) cols.Add(ip, cins);
@@ -164,8 +161,7 @@ namespace Cryville.Common.Pdt {
}
internal unsafe void PushVariable(int name, bool forced) {
fixed (StackFrame* frame = &_stack[_framecount++]) {
byte[] value;
GetVariable(name, forced, out frame->Type, out value);
GetVariable(name, forced, out frame->Type, out byte[] value);
frame->Offset = _goffset;
frame->Length = value.Length;
Array.Copy(value, 0, _mem, _goffset, value.Length);
@@ -205,7 +201,7 @@ namespace Cryville.Common.Pdt {
var frame = _stack[--_framecount];
if (frame.Type == PdtInternalType.Error) {
_framecount -= pc - i - 1;
_stack[_framecount++] = new StackFrame { Type = PdtInternalType.Error, Offset = _goffset, Length = 0 };
_stack[_framecount++] = new StackFrame { Type = PdtInternalType.Error, Offset = -1, Length = 0 };
return false;
}
op.LoadOperand(new PdtVariableMemory(frame.Type, pmem + frame.Offset, frame.Length));
@@ -218,13 +214,15 @@ namespace Cryville.Common.Pdt {
internal unsafe void Collapse(int name, ref LinkedListNode<PdtInstruction> self, LinkedListNode<PdtInstruction> target) {
fixed (byte* pmem = _mem) {
var frame = _stack[--_framecount];
_goffset -= frame.Length;
if (frame.Type == PdtInternalType.Error) {
_stack[_framecount++] = new StackFrame { Type = PdtInternalType.Error, Offset = _goffset, Length = 0 };
_stack[_framecount++] = new StackFrame { Type = PdtInternalType.Error, Offset = -1, Length = 0 };
self = target;
return;
}
if (Collapse(name, new PdtVariableMemory(frame.Type, pmem + frame.Offset, frame.Length))) {
_framecount++;
_goffset += frame.Length;
self = target;
}
}

View File

@@ -114,7 +114,7 @@ namespace Cryville.Common.Pdt {
}
}
public partial class PdtInterpreter {
static readonly Dictionary<char, int> OP_PRIORITY = new Dictionary<char, int> {
static readonly Dictionary<char, int> OP_PRIORITY = new() {
{ '@', 7 },
{ '*', 6 }, { '/', 6 }, { '%', 6 },
{ '+', 5 }, { '-', 5 },
@@ -125,7 +125,7 @@ namespace Cryville.Common.Pdt {
{ ',', 0 },
{ '$', -1 },
};
static readonly Dictionary<char, int> OP_TYPE = new Dictionary<char, int> {
static readonly Dictionary<char, int> OP_TYPE = new() {
{ '@', 0 },
{ '*', 0 }, { '/', 0 }, { '%', 0 },
{ '+', 0 }, { '-', 0 },
@@ -140,24 +140,24 @@ namespace Cryville.Common.Pdt {
PdtExpToken GetToken() {
ws();
var result = new PdtExpToken {
Type = ct & 0x0fe0
Type = ct & (CharCategory)0x0fe0
};
switch (result.Type) {
case 0x0020: result.Value = GetIdentifier(); break;
case 0x0040: result.Value = GetNumber(); break;
case 0x0100: result.Value = GetString(); break;
case CharCategory.IdentifierBegin: result.Value = GetIdentifier(); break;
case CharCategory.Digit : result.Value = GetNumber(); break;
case CharCategory.StringDelimiter: result.Value = GetString(); break;
default: result.Value = cc.ToString(); Position++; break;
}
return result;
}
private struct PdtExpToken {
public int Type { get; set; }
public CharCategory Type { get; set; }
public string Value { get; set; }
public override string ToString() {
public override readonly string ToString() {
return string.Format("0x{0:x4}: {1}", Type, Value);
}
public static readonly PdtExpToken EmptyOperator = new PdtExpToken {
Type = 0x0080,
public static readonly PdtExpToken EmptyOperator = new() {
Type = CharCategory.Operator,
Value = "$",
};
}
@@ -192,7 +192,7 @@ namespace Cryville.Common.Pdt {
t2 = InterpretExpBlock(ins);
panic:
switch (t2.Type) {
case 0x0080:
case CharCategory.Operator:
if (OP_TYPE[t1.Value[0]] != -1) {
int p1 = OP_PRIORITY[t1.Value[0]];
int p2 = OP_PRIORITY[t2.Value[0]];
@@ -213,11 +213,11 @@ namespace Cryville.Common.Pdt {
}
t1 = t2;
break;
case 0x0400:
case CharCategory.ClosingBracket:
if (enc == -2) throw new FormatException("Expression not enclosed correctly: Too many closing brackets");
if (ins.Count == insc0) pc = 0;
goto exit;
case 0x0800:
case CharCategory.EndOfExpression:
goto exit;
}
}
@@ -240,7 +240,7 @@ namespace Cryville.Common.Pdt {
/// <returns>The expression token following this expression block.</returns>
PdtExpToken InterpretExpBlock(LinkedList<PdtInstruction> ins) {
var t = GetToken();
if (t.Type == 0x0080) {
if (t.Type == CharCategory.Operator) {
var r = InterpretExpBlock(ins);
ins.AddLast(new PdtInstruction.Operate(t.Value, 1));
return r;
@@ -248,28 +248,27 @@ namespace Cryville.Common.Pdt {
bool flag = false;
PdtExpToken? buf = null;
while (true) {
if (buf != null && t.Type != 0x0200) {
PdtExpression def;
if (defs.TryGetValue(buf.Value.Value, out def)) {
if (buf != null && t.Type != CharCategory.OpeningBracket) {
if (defs.TryGetValue(buf.Value.Value, out PdtExpression def)) {
foreach (var i in def.Instructions) ins.AddLast(i);
}
else {
var name = buf.Value.Value;
if (name[0] == '?') ins.AddLast(new PdtInstruction.PushVariable(name.Substring(1), true));
if (name[0] == '?') ins.AddLast(new PdtInstruction.PushVariable(name[1..], true));
else ins.AddLast(new PdtInstruction.PushVariable(name));
}
buf = null;
TryPushAdjMul(ins, ref flag);
}
switch (t.Type) {
case 0x0020:
case CharCategory.IdentifierBegin:
buf = t;
break;
case 0x0040:
case CharCategory.Digit:
float num = float.Parse(t.Value);
ins.AddLast(new PdtInstruction.PushConstant(PdtInternalType.Number, BitConverter.GetBytes(num)));
break;
case 0x0100:
case CharCategory.StringDelimiter:
int strlen = t.Value.Length;
unsafe {
var strbuf = new byte[strlen * sizeof(char) + sizeof(int)];
@@ -280,7 +279,7 @@ namespace Cryville.Common.Pdt {
ins.AddLast(new PdtInstruction.PushConstant(PdtInternalType.String, strbuf));
}
break;
case 0x0200:
case CharCategory.OpeningBracket:
int pc;
InterpretExp(ins, -1, out pc);
if (buf != null) {

View File

@@ -1,11 +1,10 @@
using Cryville.Common.Collections;
using Cryville.Common.Logging;
using Cryville.Common.Reflection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Text;
using CMath = System.Math;
namespace Cryville.Common.Pdt {
@@ -13,23 +12,19 @@ namespace Cryville.Common.Pdt {
/// Interpreter for Property Definition Tree (PDT) file format.
/// </summary>
public partial class PdtInterpreter {
/// <summary>
/// The character category map.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item><term><c>0x0001</c></term><description>White Space</description></item>
/// <item><term><c>0x0010</c></term><description>Identifier</description></item>
/// <item><term><c>0x0020</c></term><description>Identifier Begin</description></item>
/// <item><term><c>0x0040</c></term><description>Digit</description></item>
/// <item><term><c>0x0080</c></term><description>Operator</description></item>
/// <item><term><c>0x0100</c></term><description>String</description></item>
/// <item><term><c>0x0200</c></term><description>Opening Bracket</description></item>
/// <item><term><c>0x0400</c></term><description>Closing Bracket</description></item>
/// <item><term><c>0x0800</c></term><description>End of Expression</description></item>
/// <item><term><c>0x1000</c></term><description>End of Key</description></item>
/// </list>
/// </remarks>
[Flags]
protected enum CharCategory {
WhiteSpace = 0x0001,
Identifier = 0x0010,
IdentifierBegin = 0x0020,
Digit = 0x0040,
Operator = 0x0080,
StringDelimiter = 0x0100,
OpeningBracket = 0x0200,
ClosingBracket = 0x0400,
EndOfExpression = 0x0800,
EndOfKey = 0x1000,
}
static readonly int[] cm = new int[] {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000,
@@ -69,6 +64,8 @@ namespace Cryville.Common.Pdt {
/// The current position in the string being parsed by the interpreter.
/// </summary>
public int Position { get; protected set; }
readonly StringBuilder _sb = new();
#pragma warning disable IDE1006
/// <summary>
/// The character at the current position.
@@ -79,17 +76,17 @@ namespace Cryville.Common.Pdt {
/// The category of the character.
/// </summary>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected int ct { get { return cm[cc]; } }
protected CharCategory ct { get { return (CharCategory)cm[cc]; } }
/// <summary>
/// Reads a token until a character of type <paramref name="flag" /> is met.
/// </summary>
/// <param name="flag">The type filter.</param>
/// <returns>A token from the current position (inclusive) to the next character of type <paramref name="flag" /> (exclusive).</returns>
/// <exception cref="IndexOutOfRangeException">No character of type <paramref name="flag" /> is met.</exception>
protected string tokenb(int flag) {
protected string tokenb(CharCategory flag) {
int sp = Position;
while ((ct & flag) == 0) Position++;
return Source.Substring(sp, Position - sp);
return Source[sp..Position];
}
/// <summary>
/// Reads a token until a character that is not of type <paramref name="flag" /> is met.
@@ -97,17 +94,17 @@ namespace Cryville.Common.Pdt {
/// <param name="flag">The type filter.</param>
/// <returns>A token from the current position (inclusive) to the next character that is not of type <paramref name="flag" /> (exclusive).</returns>
/// <exception cref="IndexOutOfRangeException">No character that is not of type <paramref name="flag" /> is met.</exception>
protected string tokenw(int flag) {
protected string tokenw(CharCategory flag) {
int sp = Position;
while ((ct & flag) != 0) Position++;
return Source.Substring(sp, Position - sp);
return Source[sp..Position];
}
/// <summary>
/// Skips over whitespaces.
/// </summary>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected void ws() {
while ((ct & 0x0001) != 0) Position++;
while ((ct & CharCategory.WhiteSpace) != 0) Position++;
}
#pragma warning restore IDE1006
@@ -127,8 +124,8 @@ namespace Cryville.Common.Pdt {
/// <returns>An identifier.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetIdentifier() {
if ((ct & 0x0020) == 0) return "";
return tokenw(0x0010);
if ((ct & CharCategory.IdentifierBegin) == 0) return "";
return tokenw(CharCategory.Identifier);
}
/// <summary>
/// Reads a number.
@@ -136,7 +133,7 @@ namespace Cryville.Common.Pdt {
/// <returns>A number.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetNumber() {
return tokenw(0x0040);
return tokenw(CharCategory.Digit);
}
/// <summary>
/// Reads a string.
@@ -144,13 +141,15 @@ namespace Cryville.Common.Pdt {
/// <returns>A string.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetString() {
int sp = Position;
do {
if (cc == '\\') Position++;
Position++;
} while (ct != 0x0100);
_sb.Clear();
Position++;
return Regex.Replace(Source.Substring(sp + 1, Position - sp - 2), @"\\(.)", "$1");
while (ct != CharCategory.StringDelimiter) {
if (cc == '\\') Position++;
_sb.Append(cc);
Position++;
}
Position++;
return _sb.ToString();
}
/// <summary>
/// Reads an expression.
@@ -164,7 +163,7 @@ namespace Cryville.Common.Pdt {
return new PdtExpression(ins);
}
readonly Dictionary<string, PdtExpression> defs = new Dictionary<string, PdtExpression>();
readonly Dictionary<string, PdtExpression> defs = new();
/// <summary>
/// Creates an instance of the <see cref="PdtInterpreter" /> class.
/// </summary>
@@ -187,8 +186,7 @@ namespace Cryville.Common.Pdt {
public object Interpret(Type type) {
try {
if (m_formatVersion == null) InterpretDirectives();
if (_binder == null)
_binder = BinderAttribute.CreateBinderOfType(type);
_binder ??= BinderAttribute.CreateBinderOfType(type);
return InterpretObject(type);
}
catch (Exception ex) {
@@ -203,7 +201,7 @@ namespace Cryville.Common.Pdt {
switch (GetIdentifier()) {
case "ver":
ws();
Logger.Log("main", 3, "PDT", "Legacy PDT directive #ver={0} found. Ignoring.", GetNumber());
Shared.Logger.Log(3, "PDT", "Legacy PDT directive #ver={0} found. Ignoring.", GetNumber());
break;
case "format":
ws();
@@ -257,18 +255,17 @@ namespace Cryville.Common.Pdt {
}
void InterpretObjectInternal<T>(bool pcflag, Type type, object pkey, object result, Func<Type, object> vfunc) where T : Attribute {
if (pcflag) {
using (var collection = new PairCollection(result)) {
var ktype = type.GetGenericArguments()[0];
var ptype = type.GetGenericArguments()[1];
object key = _binder.ChangeType(pkey, ktype, null);
object value = vfunc(ptype);
collection.Add(key, value);
}
using var collection = new PairCollection(result);
var ktype = type.GetGenericArguments()[0];
var ptype = type.GetGenericArguments()[1];
object key = _binder.ChangeType(pkey, ktype, null);
object value = vfunc(ptype);
collection.Add(key, value);
}
else {
MemberInfo prop = null;
bool flag = false;
if (pkey is string) prop = FieldLikeHelper.GetMember(type, (string)pkey);
if (pkey is string pname) prop = FieldLikeHelper.GetMember(type, pname);
if (prop == null) {
prop = FieldLikeHelper.FindMemberWithAttribute<T>(type);
flag = true;
@@ -280,13 +277,12 @@ namespace Cryville.Common.Pdt {
if (origCollection == null) {
FieldLikeHelper.SetValue(prop, result, origCollection = Activator.CreateInstance(ptype));
}
using (var collection = new PairCollection(origCollection)) {
var ktype = ptype.GetGenericArguments()[0];
var vtype = ptype.GetGenericArguments()[1];
object key = _binder.ChangeType(pkey, ktype, null);
object value = vfunc(vtype);
collection.Add(key, value);
}
using var collection = new PairCollection(origCollection);
var ktype = ptype.GetGenericArguments()[0];
var vtype = ptype.GetGenericArguments()[1];
object key = _binder.ChangeType(pkey, ktype, null);
object value = vfunc(vtype);
collection.Add(key, value);
}
else FieldLikeHelper.SetValue(prop, result, vfunc(ptype), _binder);
}
@@ -296,7 +292,7 @@ namespace Cryville.Common.Pdt {
/// </summary>
/// <returns>The interpreted key.</returns>
protected virtual object InterpretKey(Type type) {
return tokenb(0x1000).Trim();
return tokenb(CharCategory.EndOfKey).Trim();
}
}
/// <summary>
@@ -327,7 +323,7 @@ namespace Cryville.Common.Pdt {
src.Take(interpreter.Position).Count(c => c == '\n') + 1,
pos - lineStartPos + 1,
innerException == null ? "Unknown error" : innerException.Message,
src.Substring(previewStartPos, previewEndPos - previewStartPos)
src[previewStartPos..previewEndPos]
);
}
}

View File

@@ -102,17 +102,17 @@ namespace Cryville.Common.Pdt {
ParamCount = paramCount;
_hash = Name ^ ((ParamCount << 16) | (ParamCount >> 16));
}
public override bool Equals(object obj) {
if (!(obj is PdtOperatorSignature)) return false;
return Equals((PdtOperatorSignature)obj);
public override readonly bool Equals(object obj) {
if (obj is not PdtOperatorSignature other) return false;
return Equals(other);
}
public bool Equals(PdtOperatorSignature other) {
public readonly bool Equals(PdtOperatorSignature other) {
return Name == other.Name && ParamCount == other.ParamCount;
}
public override int GetHashCode() {
public override readonly int GetHashCode() {
return _hash;
}
public override string ToString() {
public override readonly string ToString() {
return string.Format("{0}({1})", IdentifierManager.Shared.Retrieve(Name), ParamCount);
}
}

View File

@@ -24,7 +24,7 @@ namespace Cryville.Common.Pdt {
/// Copies the memory in the span to another span.
/// </summary>
/// <param name="dest">The destination span.</param>
public void CopyTo(PdtVariableMemory dest) {
public readonly void CopyTo(PdtVariableMemory dest) {
CopyTo(dest._ptr, 0, Length);
}
/// <summary>
@@ -32,7 +32,7 @@ namespace Cryville.Common.Pdt {
/// </summary>
/// <param name="dest">The destination buffer.</param>
/// <param name="destOffset">The offset on the destination buffer to start copying to.</param>
public void CopyTo(byte[] dest, int destOffset) {
public readonly void CopyTo(byte[] dest, int destOffset) {
fixed (byte* ptr = dest) {
CopyTo(ptr, destOffset, Length);
}
@@ -44,13 +44,13 @@ namespace Cryville.Common.Pdt {
/// <param name="destOffset">The offset on the destination buffer to start copying to.</param>
/// <param name="length">The length to copy.</param>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="length" /> is greater than the length of the span.</exception>
public void CopyTo(byte* dest, int destOffset, int length) {
public readonly void CopyTo(byte* dest, int destOffset, int length) {
if (length > Length) throw new ArgumentOutOfRangeException("length");
for (int i = 0; i < length; i++)
dest[destOffset + i] = _ptr[i];
}
/// <inheritdoc />
public bool Equals(PdtVariableMemory obj) {
public readonly bool Equals(PdtVariableMemory obj) {
if (Type != obj.Type || Length != obj.Length) return false;
for (int i = 0; i < Length; i++) {
if (*(_ptr + i) != *(obj._ptr + i)) return false;
@@ -63,7 +63,7 @@ namespace Cryville.Common.Pdt {
/// <param name="offset">The offset on the span to start reading from.</param>
/// <returns>A number.</returns>
/// <exception cref="InvalidCastException">The span at the offset does not represent a number.</exception>
public float AsNumber(int offset = 0) {
public readonly float AsNumber(int offset = 0) {
if (Type != PdtInternalType.Number && Type != PdtInternalType.Vector)
throw new InvalidCastException("Not a number");
float value;
@@ -79,7 +79,7 @@ namespace Cryville.Common.Pdt {
/// <param name="offset">The offset from the start of the span.</param>
/// <exception cref="InvalidCastException">The span at the offset does not represent a number.</exception>
/// <exception cref="InvalidOperationException">The length of the span is not sufficient.</exception>
public void SetNumber(float value, int offset = 0) {
public readonly void SetNumber(float value, int offset = 0) {
if (Type != PdtInternalType.Number && Type != PdtInternalType.Vector)
throw new InvalidCastException("Not a number");
if (Length < sizeof(float) + offset)
@@ -94,7 +94,7 @@ namespace Cryville.Common.Pdt {
/// <param name="offset">The offset on the span to start reading from.</param>
/// <returns>A string.</returns>
/// <exception cref="InvalidCastException">The span at the offset does not represent a string.</exception>
public string AsString(int offset = 0) {
public readonly string AsString(int offset = 0) {
if (Type != PdtInternalType.String && Type != PdtInternalType.Array)
throw new InvalidCastException("Not a string");
var len = *(int*)(_ptr + offset);
@@ -107,7 +107,7 @@ namespace Cryville.Common.Pdt {
/// <param name="offset">The offset from the start of the span.</param>
/// <exception cref="InvalidCastException">The span at the offset does not represent a string.</exception>
/// <exception cref="InvalidOperationException">The length of the span is not sufficient.</exception>
public void SetString(string value, int offset = 0) {
public readonly void SetString(string value, int offset = 0) {
if (Type != PdtInternalType.String && Type != PdtInternalType.Array)
throw new InvalidCastException("Not a string");
int strlen = value.Length;
@@ -124,7 +124,7 @@ namespace Cryville.Common.Pdt {
/// <param name="offset">The offset on the span to start reading from.</param>
/// <returns>The name of an undefined identifier.</returns>
/// <exception cref="InvalidCastException">The span does not represent an undefined identifier.</exception>
public int AsIdentifier(int offset = 0) {
public readonly int AsIdentifier(int offset = 0) {
if (Type != PdtInternalType.Undefined && Type != PdtInternalType.Array)
throw new InvalidCastException("Not an identifier");
return *(int*)(_ptr + offset);
@@ -140,7 +140,7 @@ namespace Cryville.Common.Pdt {
/// <remarks>
/// <para>Use <see cref="AsNumber(int)" /> instead while reading an unaligned number.</para>
/// </remarks>
public T As<T>(int offset = 0) {
public readonly T As<T>(int offset = 0) {
var len = Unsafe.SizeOf<T>();
if (offset >= Length)
throw new ArgumentOutOfRangeException("offset");
@@ -159,7 +159,7 @@ namespace Cryville.Common.Pdt {
/// <remarks>
/// <para>Use <see cref="SetNumber(float, int)" /> instead while writing an unaligned number.</para>
/// </remarks>
public void Set<T>(T value, int offset = 0) {
public readonly void Set<T>(T value, int offset = 0) {
var len = Unsafe.SizeOf<T>();
if (offset >= Length)
throw new ArgumentOutOfRangeException("offset");
@@ -173,7 +173,7 @@ namespace Cryville.Common.Pdt {
/// <param name="arrtype">The type of the array.</param>
/// <param name="pc">The item count of the array.</param>
/// <exception cref="InvalidCastException">The span does not represent an array.</exception>
public void GetArraySuffix(out int arrtype, out int pc) {
public readonly void GetArraySuffix(out int arrtype, out int pc) {
if (Type != PdtInternalType.Vector && Type != PdtInternalType.Array)
throw new InvalidCastException("Not an array or vector");
arrtype = *(int*)(_ptr + Length - sizeof(int));
@@ -186,7 +186,7 @@ namespace Cryville.Common.Pdt {
/// <param name="arrtype">The type of the array.</param>
/// <param name="pc">The item count of the array.</param>
/// <exception cref="InvalidCastException">The span does not represent an array.</exception>
public void SetArraySuffix(int arrtype, int pc = 0) {
public readonly void SetArraySuffix(int arrtype, int pc = 0) {
if (Type != PdtInternalType.Vector && Type != PdtInternalType.Array)
throw new InvalidCastException("Not an array or vector");
*(int*)(_ptr + Length - sizeof(int)) = arrtype;

View File

@@ -0,0 +1,28 @@
using System;
namespace Cryville.Common {
public struct Qualified<T> : IFormattable where T : IConvertible {
static readonly string _prefixes = "yzafpnμm kMGTPEZY";
public T Value { get; set; }
public string Unit { get; set; }
public Qualified(string unit) : this(default, unit) { }
public Qualified(T value, string unit) {
Value = value;
Unit = unit;
}
public override readonly string ToString() { return ToString("G3"); }
public readonly string ToString(string format) { return ToString(format, null); }
public readonly string ToString(string format, IFormatProvider formatProvider) {
double value = Value.ToDouble(formatProvider);
int expIndex = (int)System.Math.Log10(value) / 3;
if (expIndex == 0) {
return value.ToString(format, formatProvider) + Unit;
}
int prefixIndex = System.Math.Clamp(expIndex + 8, 0, _prefixes.Length - 1);
value /= System.Math.Pow(1e3, prefixIndex - 8);
return value.ToString(format, formatProvider) + _prefixes[prefixIndex] + Unit;
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ae9dab8f520fadc4194032f523ca87c1
guid: 909a28e78d4239f4c9507c3c9128baf2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,7 @@
using Cryville.Common.Logging;
namespace Cryville.Common {
public static class Shared {
public static readonly Logger Logger = new();
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9653d5e145f2866439a0fcd1b27f49c4
guid: ef30832cb8f75dd4bb24744d068553f2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -13,7 +13,7 @@ namespace Cryville.Common {
/// <param name="s">The file name or file path.</param>
/// <returns>The file name or file path with the extension removed.</returns>
public static string TrimExt(string s) {
return s.Substring(0, s.LastIndexOf("."));
return s[..s.LastIndexOf(".")];
}
/// <summary>
/// Converts the value of a <see cref="TimeSpan" /> to a human-readable string.
@@ -52,12 +52,12 @@ namespace Cryville.Common {
public static string GetProcessPathFromCommand(string command) {
command = command.Trim();
if (command[0] == '"') {
return command.Substring(1, command.IndexOf('"', 1) - 1);
return command[1..command.IndexOf('"', 1)];
}
else {
int e = command.IndexOf(' ');
if (e == -1) return command;
else return command.Substring(0, e);
else return command[..e];
}
}
}

View File

@@ -0,0 +1,95 @@
using System;
namespace Cryville.Common {
public class PropertyTweener<T> {
readonly Func<T> _getter;
readonly Action<T> _setter;
readonly Tweener<T> _tweener;
public PropertyTweener(Func<T> getter, Action<T> setter, Tweener<T> tweener) {
_getter = getter;
_setter = setter;
_tweener = tweener;
var initialValue = getter();
_tweener.Start(initialValue, initialValue, float.Epsilon);
}
public PropertyTweener<T> Start(T endValue, float duration) {
_tweener.Start(_getter(), endValue, duration);
return this;
}
public void Advance(float deltaTime) {
if (!_tweener.Advance(deltaTime, out var value)) return;
_setter(value);
}
}
public delegate T Addition<T>(T a, T b);
public delegate T Multiplication<T>(float k, T b);
public delegate float EasingFunction(float t);
public class Tweener<T> {
readonly Addition<T> _addition;
readonly Multiplication<T> _multiplication;
public Tweener(Addition<T> addition, Multiplication<T> multiplication) {
_addition = addition;
_multiplication = multiplication;
}
public EasingFunction EasingFunction { get; set; } = EasingFunctions.Linear;
public Tweener<T> With(EasingFunction easing) {
EasingFunction = easing;
return this;
}
T _startValue = default;
T _endValue = default;
float _duration = float.Epsilon;
float _time;
bool _endOfTween;
public Tweener<T> Start(T startValue, T endValue, float duration) {
_startValue = startValue;
_endValue = endValue;
_duration = duration;
_time = 0;
_endOfTween = false;
return this;
}
public bool Advance(float deltaTime, out T value) {
if (_endOfTween) {
value = _endValue;
return false;
}
if (_time >= _duration) {
value = _endValue;
_endOfTween = true;
return true;
}
_time += deltaTime;
var ratio = EasingFunction(System.Math.Clamp(_time / _duration, 0, 1));
value = _addition(_multiplication(1 - ratio, _startValue), _multiplication(ratio, _endValue));
return true;
}
public Tweener<object> Boxed() {
return new Tweener<object>((a, b) => _addition((T)a, (T)b), (k, v) => _multiplication(k, (T)v));
}
}
public static class Tweeners {
public static Tweener<byte> Byte => new((a, b) => (byte)(a + b), (k, v) => (byte)(k * v));
public static Tweener<sbyte> SByte => new((a, b) => (sbyte)(a + b), (k, v) => (sbyte)(k * v));
public static Tweener<short> Int16 => new((a, b) => (short)(a + b), (k, v) => (short)(k * v));
public static Tweener<ushort> UInt16 => new((a, b) => (ushort)(a + b), (k, v) => (ushort)(k * v));
public static Tweener<int> Int32 => new((a, b) => a + b, (k, v) => (int)(k * v));
public static Tweener<uint> UInt32 => new((a, b) => a + b, (k, v) => (uint)(k * v));
public static Tweener<long> Int64 => new((a, b) => a + b, (k, v) => (long)(k * v));
public static Tweener<ulong> UInt64 => new((a, b) => a + b, (k, v) => (ulong)(k * v));
public static Tweener<IntPtr> IntPtr => new((a, b) => new IntPtr((long)a + (long)b), (k, v) => new IntPtr((long)(k * (long)v)));
public static Tweener<UIntPtr> UIntPtr => new((a, b) => new UIntPtr((ulong)a + (ulong)b), (k, v) => new UIntPtr((ulong)(k * (ulong)v)));
public static Tweener<float> Float => new((a, b) => a + b, (k, v) => k * v);
public static Tweener<double> Double => new((a, b) => a + b, (k, v) => k * v);
}
public static class EasingFunctions {
public static float Linear(float x) => x;
public static float InQuad(float x) => x * x;
public static float InCubic(float x) => x * x * x;
public static float InSine(float x) => 1 - OutSine(1 - x);
public static float OutQuad(float x) => 1 - InQuad(1 - x);
public static float OutCubic(float x) => 1 - InCubic(1 - x);
public static float OutSine(float x) => MathF.Sin(x * MathF.PI / 2);
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 54c06a15adfb41548acca0d73f391fe7
guid: 0b4037ba4138aae47b8da984f30b4db9
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,26 +0,0 @@
using System;
using UnityEngine;
namespace Cryville.Common.Unity {
static class CallHelper {
public static bool HasFlag(this Enum obj, Enum flag) {
ulong num = Convert.ToUInt64(flag);
ulong num2 = Convert.ToUInt64(obj);
return (num2 & num) == num;
}
public static void Purge(Transform obj) {
foreach (Transform i in obj)
GameObject.Destroy(i.gameObject);
}
/*public static void DownloadAndUnzip(string url, FileInfo file) {
using (DownloadDialog d = new DownloadDialog()) {
d.Download(url, file);
}
using (ZipFile z = new ZipFile(file.FullName)) {
z.ExtractAll(file.DirectoryName, ExtractExistingFileAction.OverwriteSilently);
}
}*/
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 98b3d4b7cc1ce054598780159356da35
timeCreated: 1608801352
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,147 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
namespace Cryville.Common.Unity {
public class FileDialog : MonoBehaviour {
Transform panel;
Transform title;
Transform drives;
Transform dirs;
Transform files;
public event Action OnClose;
#if UNITY_ANDROID && !UNITY_EDITOR_WIN
string androidStorage = "";
#endif
string fileName = null;
public string FileName {
get { return fileName; }
}
public string[] m_filter = new string[]{};
public string[] Filter {
set { m_filter = value; }
}
public IReadOnlyDictionary<string, string> m_presetPaths = new Dictionary<string, string>();
public IReadOnlyDictionary<string, string> PresetPaths {
get { return m_presetPaths; }
set { m_presetPaths = value; }
}
GameObject prefabButton;
void Start() {
prefabButton = Resources.Load<GameObject>("Common/Button");
panel = gameObject.transform.Find("Panel");
title = panel.Find("Title/Text");
drives = panel.Find("Drives/DrivesInner");
dirs = panel.Find("Directories/DirectoriesInner");
files = panel.Find("Files/FilesInner");
if (CurrentDirectory == null) {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
CurrentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
#elif UNITY_ANDROID
using (AndroidJavaClass ajc = new AndroidJavaClass("android.os.Environment"))
using (AndroidJavaObject file = ajc.CallStatic<AndroidJavaObject>("getExternalStorageDirectory")) {
androidStorage = file.Call<string>("getAbsolutePath");
CurrentDirectory = new DirectoryInfo(androidStorage);
}
#else
#error No default directory
#endif
}
UpdateGUI(0);
}
public void Show() {
fileName = null;
gameObject.SetActive(true);
}
public void Close() {
var ev = OnClose;
if (ev != null) ev.Invoke();
gameObject.SetActive(false);
}
public DirectoryInfo CurrentDirectory;
void ChangeDirectory(DirectoryInfo s) {
CurrentDirectory = s;
UpdateGUI(1);
}
void SelectFile(string s) {
fileName = s;
Close();
}
void UpdateGUI(int depth) {
title.GetComponent<Text>().text = CurrentDirectory.FullName;
if (depth <= 0) {
CallHelper.Purge(drives);
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
var dl = Directory.GetLogicalDrives();
foreach (string d in dl) {
GameObject btn = Instantiate(prefabButton);
btn.GetComponentInChildren<Text>().text = d;
btn.GetComponentInChildren<Button>().onClick.AddListener(() => ChangeDirectory(new DirectoryInfo(d)));
btn.transform.SetParent(drives, false);
}
#elif UNITY_ANDROID
GameObject sbtn = GameObject.Instantiate<GameObject>(prefabButton);
sbtn.GetComponentInChildren<Text>().text = "Storage";
sbtn.GetComponentInChildren<Button>().onClick.AddListener(() => ChangeDirectory(new DirectoryInfo(androidStorage)));
sbtn.transform.SetParent(drives, false);
#else
#error No update GUI logic
#endif
foreach (var p in m_presetPaths) {
var d = new DirectoryInfo(p.Value);
if (d.Exists) {
GameObject btn = Instantiate(prefabButton);
btn.GetComponentInChildren<Text>().text = p.Key;
btn.GetComponentInChildren<Button>().onClick.AddListener(() => ChangeDirectory(d));
btn.transform.SetParent(drives, false);
}
}
}
CallHelper.Purge(dirs);
DirectoryInfo[] subdirs = CurrentDirectory.GetDirectories();
GameObject pbtn = Instantiate(prefabButton);
pbtn.GetComponentInChildren<Text>().text = "..";
pbtn.GetComponentInChildren<Button>().onClick.AddListener(() => ChangeDirectory(new DirectoryInfo(Path.Combine(CurrentDirectory.FullName, ".."))));
pbtn.transform.SetParent(dirs, false);
foreach (DirectoryInfo d in subdirs) {
GameObject btn = Instantiate(prefabButton);
btn.GetComponentInChildren<Text>().text = d.Name;
var ts = d;
btn.GetComponentInChildren<Button>().onClick.AddListener(() => ChangeDirectory(ts));
btn.transform.SetParent(dirs, false);
}
CallHelper.Purge(files);
FileInfo[] fl = CurrentDirectory.GetFiles();
foreach (FileInfo d in fl) {
foreach (string ext in m_filter) {
if (d.Extension == ext) {
GameObject btn = Instantiate(prefabButton);
btn.GetComponentInChildren<Text>().text = d.Name + " / " + (d.Length / 1024.0).ToString("0.0 KiB");
var ts = d.FullName;
btn.GetComponentInChildren<Button>().onClick.AddListener(() => SelectFile(ts));
btn.transform.SetParent(files, false);
break;
}
}
}
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 9865f498871e30548959e6b28f91feae
timeCreated: 1608801352
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -16,7 +16,7 @@ namespace Cryville.Common.Unity {
public class NetworkTaskWorker {
bool suspended;
NetworkTask currentNetworkTask;
readonly Queue<NetworkTask> networkTasks = new Queue<NetworkTask>();
readonly Queue<NetworkTask> networkTasks = new();
/// <summary>
/// Current queued task count.
@@ -57,6 +57,7 @@ namespace Cryville.Common.Unity {
suspended = true;
if (currentNetworkTask != null) {
currentNetworkTask.Cancel();
networkTasks.Enqueue(currentNetworkTask);
currentNetworkTask = null;
}
}
@@ -91,15 +92,6 @@ namespace Cryville.Common.Unity {
/// A network task.
/// </summary>
public abstract class NetworkTask {
protected NetworkTask(string uri) {
Uri = uri;
}
/// <summary>
/// The URI of the resource.
/// </summary>
public string Uri { get; private set; }
/// <summary>
/// Whether the task is cancelled.
/// </summary>
@@ -108,40 +100,56 @@ namespace Cryville.Common.Unity {
/// <summary>
/// Cancels the task.
/// </summary>
public virtual void Cancel() {
public void Cancel() {
Cancelled = true;
OnCancel();
}
protected virtual void OnCancel() { }
#if UNITY_5_4_OR_NEWER
protected UnityWebRequest www;
/// <summary>
/// Starts the task.
/// </summary>
public virtual void Start() {
www = new UnityWebRequest(Uri);
www.SendWebRequest();
}
public abstract void Start();
/// <summary>
/// Gets whether the task is done.
/// </summary>
/// <returns>Whether the task is done.</returns>
public virtual bool Done() {
public abstract bool Done();
}
/// <summary>
/// A Unity network task.
/// </summary>
public abstract class UnityNetworkTask : NetworkTask {
protected UnityNetworkTask(string uri) {
Uri = uri;
}
/// <summary>
/// The URI of the resource.
/// </summary>
public string Uri { get; private set; }
#if UNITY_5_4_OR_NEWER
protected UnityWebRequest www;
/// <inheritdoc />
public override void Start() {
www = new UnityWebRequest(Uri);
www.SendWebRequest();
}
/// <inheritdoc />
public override bool Done() {
if (!www.isDone) return false;
return true;
}
#else
protected WWW www;
/// <summary>
/// Starts the task.
/// </summary>
/// <inheritdoc />
public virtual void Start() {
www = new WWW(Uri);
}
/// <summary>
/// Gets whether the task is done.
/// </summary>
/// <returns>Whether the task is done.</returns>
/// <inheritdoc />
public virtual bool Done() {
if (!www.isDone) return false;
return true;
@@ -149,9 +157,9 @@ namespace Cryville.Common.Unity {
#endif
}
/// <summary>
/// A <see cref="NetworkTask" /> that loads a texture.
/// A <see cref="UnityNetworkTask" /> that loads a texture.
/// </summary>
public class LoadTextureTask : NetworkTask {
public class LoadTextureTask : UnityNetworkTask {
/// <summary>
/// Creates an instance of the <see cref="LoadTextureTask" /> class.
/// </summary>

View File

@@ -0,0 +1,50 @@
#if UNITY_EDITOR
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
namespace Cryville.Common.Unity {
[InitializeOnLoad]
public class ScopedThreadAttacherInjector {
static readonly Encoding _encoding = new UTF8Encoding(false, true);
static string _filePath;
static string _oldSrc;
static ScopedThreadAttacherInjector() {
BuildPlayerWindow.RegisterBuildPlayerHandler(opt => HandlePlayerBuild(opt));
}
static void HandlePlayerBuild(BuildPlayerOptions opt) {
try {
OnPreprocessBuild();
BuildPlayerWindow.DefaultBuildMethods.BuildPlayer(opt);
}
finally {
OnPostprocessBuild();
}
}
static void OnPreprocessBuild() {
var il2cppRoot = Environment.GetEnvironmentVariable("UNITY_IL2CPP_PATH");
if (string.IsNullOrEmpty(il2cppRoot)) {
_filePath = string.Empty;
return;
}
_filePath = Path.Combine(il2cppRoot, "libil2cpp", "vm", "ScopedThreadAttacher.cpp");
if (!File.Exists(_filePath)) {
_filePath = string.Empty;
return;
}
_oldSrc = File.ReadAllText(_filePath, _encoding);
File.WriteAllText(_filePath, Regex.Replace(_oldSrc, @"~\s*?ScopedThreadAttacher\s*?\(\s*?\)\s*?\{.*\}", "~ScopedThreadAttacher(){}", RegexOptions.Singleline), _encoding);
}
static void OnPostprocessBuild() {
if (string.IsNullOrEmpty(_filePath)) return;
File.WriteAllText(_filePath, _oldSrc, _encoding);
}
}
}
#endif

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 29a6376ce10b77e4099d2613876f9549
guid: 2322d8e9250e9e6469826361223dfdda
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,25 @@
using UnityEngine;
namespace Cryville.Common.Unity {
public abstract class SingletonBehaviour<TSelf> : MonoBehaviour where TSelf : SingletonBehaviour<TSelf> {
static TSelf s_instance;
public static TSelf Instance {
get {
return s_instance;
}
}
bool _validInstance;
protected virtual void Awake() {
if (s_instance != null) {
Debug.LogErrorFormat("Duplicate singleton behaviour {0}", typeof(TSelf));
Destroy(gameObject);
return;
}
s_instance = (TSelf)this;
_validInstance = true;
}
protected virtual void OnDestroy() {
if (_validInstance) s_instance = null;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9dd02eadcf1c6e745939a75a797c9093
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,181 @@
using Cryville.Common.Reflection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
namespace Cryville.Common.Unity {
public class StateTweener : MonoBehaviour {
[SerializeField]
State[] m_states;
[Serializable]
struct State {
[SerializeField]
public string Name;
[SerializeField]
public AttributeState[] Attributes;
}
[Serializable]
struct AttributeState {
[SerializeField]
public AttributeBinding Attribute;
[SerializeField]
public string Value;
}
[Serializable]
struct AttributeBinding : IEquatable<AttributeBinding> {
[SerializeField]
public Component Component;
[SerializeField]
public string Attribute;
public readonly bool Equals(AttributeBinding other) {
return Component.Equals(other.Component) && Attribute.Equals(other.Attribute);
}
public override readonly bool Equals(object obj) {
return obj is AttributeBinding other && Equals(other);
}
public override readonly int GetHashCode() {
return Component.GetHashCode() ^ Attribute.GetHashCode();
}
}
[SerializeField]
StateTweener[] m_children;
readonly List<string> _statePriority = new();
readonly Dictionary<AttributeBinding, object> _defaults = new();
readonly Dictionary<AttributeBinding, PropertyTweener<object>> _tweeners = new();
readonly Dictionary<string, Dictionary<AttributeBinding, object>> _runtimeStates = new();
void Awake() {
var types = new Dictionary<AttributeBinding, Type>();
foreach (var state in m_states) {
Dictionary<AttributeBinding, object> attrs;
_statePriority.Add(state.Name);
_runtimeStates.Add(state.Name, attrs = new Dictionary<AttributeBinding, object>());
foreach (var attr in state.Attributes) {
var binding = attr.Attribute;
if (!types.TryGetValue(binding, out var type)) {
var comp = binding.Component;
var ctype = comp.GetType();
var path = binding.Attribute.Split('.');
var propName = path[0];
var prop = ctype.GetMember(propName, MemberTypes.Field | MemberTypes.Property, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static).Single();
var gvd = FieldLikeHelper.GetGetValueDelegate(prop);
var svd = FieldLikeHelper.GetSetValueDelegate(prop);
Func<object> getter;
Action<object> setter;
if (path.Length == 1) {
type = FieldLikeHelper.GetMemberType(prop);
getter = () => gvd(comp);
setter = v => svd(comp, v);
}
else if (path.Length == 2) {
var propType = FieldLikeHelper.GetMemberType(prop);
var subPropName = path[1];
var subProp = propType.GetMember(subPropName, MemberTypes.Field | MemberTypes.Property, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static).Single();
type = FieldLikeHelper.GetMemberType(subProp);
var gsvd = FieldLikeHelper.GetGetValueDelegate(subProp);
getter = () => gsvd(gvd(comp));
var ssvd = FieldLikeHelper.GetSetValueDelegate(subProp);
setter = v => {
object obj = gvd(comp);
ssvd(obj, v);
svd(comp, obj);
};
}
else {
throw new FormatException("Invalid attribute path.");
}
_tweeners.Add(binding, CreateTweener(type, getter, setter));
_defaults.Add(binding, getter());
types.Add(binding, type);
}
attrs.Add(binding, Convert.ChangeType(attr.Value, type));
}
}
foreach (var def in _defaults) {
foreach (var state in _runtimeStates) {
if (!state.Value.ContainsKey(def.Key)) {
state.Value.Add(def.Key, def.Value);
}
}
}
_spcmp = new StatePriorityComparer(this);
}
PropertyTweener<object> CreateTweener(Type type, Func<object> getter, Action<object> setter) {
if (type == typeof(byte)) return new PropertyTweener<object>(getter, setter, Tweeners.Byte.Boxed());
else if (type == typeof(sbyte)) return new PropertyTweener<object>(getter, setter, Tweeners.SByte.Boxed());
else if (type == typeof(short)) return new PropertyTweener<object>(getter, setter, Tweeners.Int16.Boxed());
else if (type == typeof(ushort)) return new PropertyTweener<object>(getter, setter, Tweeners.UInt16.Boxed());
else if (type == typeof(int)) return new PropertyTweener<object>(getter, setter, Tweeners.Int32.Boxed());
else if (type == typeof(uint)) return new PropertyTweener<object>(getter, setter, Tweeners.UInt32.Boxed());
else if (type == typeof(long)) return new PropertyTweener<object>(getter, setter, Tweeners.Int64.Boxed());
else if (type == typeof(ulong)) return new PropertyTweener<object>(getter, setter, Tweeners.UInt64.Boxed());
else if (type == typeof(IntPtr)) return new PropertyTweener<object>(getter, setter, Tweeners.IntPtr.Boxed());
else if (type == typeof(UIntPtr)) return new PropertyTweener<object>(getter, setter, Tweeners.UIntPtr.Boxed());
else if (type == typeof(float)) return new PropertyTweener<object>(getter, setter, Tweeners.Float.Boxed());
else if (type == typeof(double)) return new PropertyTweener<object>(getter, setter, Tweeners.Double.Boxed());
else throw new NotSupportedException("Property type not supported.");
}
void Update() {
foreach (var tweener in _tweeners) tweener.Value.Advance(Time.deltaTime);
}
readonly List<string> m_cState = new();
public IReadOnlyList<string> CurrentState => m_cState;
public void ClearState(float transitionDuration = float.Epsilon) {
foreach (var child in m_children) child.ClearState(transitionDuration);
m_cState.Clear();
foreach (var tweener in _tweeners) {
tweener.Value.Start(_defaults[tweener.Key], transitionDuration);
}
}
public void EnterState(string state, float transitionDuration = float.Epsilon) {
if (_runtimeStates.TryGetValue(state, out var rs)) {
int index = m_cState.BinarySearch(state, _spcmp);
if (index < 0) {
index = ~index;
m_cState.Insert(index, state);
}
if (index == m_cState.Count - 1) {
foreach (var s in rs) {
_tweeners[s.Key].Start(s.Value, transitionDuration);
}
}
}
foreach (var child in m_children) child.EnterState(state, transitionDuration);
}
public void ExitState(string state, float transitionDuration = float.Epsilon) {
foreach (var child in m_children) child.ExitState(state, transitionDuration);
if (!_runtimeStates.ContainsKey(state)) return;
int index = m_cState.BinarySearch(state, _spcmp);
if (index < 0) return;
m_cState.RemoveAt(index);
if (index < m_cState.Count) return;
var attrs = m_cState.Count == 0 ? _defaults : _runtimeStates[m_cState[^1]];
foreach (var tweener in _tweeners) {
tweener.Value.Start(attrs[tweener.Key], transitionDuration);
}
}
StatePriorityComparer _spcmp;
class StatePriorityComparer : IComparer<string> {
readonly StateTweener _self;
public StatePriorityComparer(StateTweener self) {
_self = self;
}
public int Compare(string x, string y) {
return _self._statePriority.IndexOf(x).CompareTo(_self._statePriority.IndexOf(y));
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d605791cb18d88e4fb0ab6f794361eee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -6,6 +6,7 @@ namespace Cryville.Common.Unity.UI {
/// <summary>
/// A <see cref="ILayoutElement" /> that takes the length of one axis to compute the preferred length of the other axis with respect to a aspect ratio.
/// </summary>
[ExecuteAlways]
public class AspectRatioLayoutElement : UIBehaviour, ILayoutElement {
[SerializeField]
[Tooltip("The aspect ratio. Width divided by height.")]
@@ -35,32 +36,27 @@ namespace Cryville.Common.Unity.UI {
SetDirty();
}
private void SetDirty() {
if (!IsActive()) return;
LayoutRebuilder.MarkLayoutForRebuild(transform as RectTransform);
}
/// <inheritdoc />
public float minWidth {
get {
return m_isVertical ? 0 : (transform as RectTransform).rect.height * m_aspectRatio;
return m_isVertical ? -1 : (transform as RectTransform).rect.height * m_aspectRatio;
}
}
/// <inheritdoc />
public float preferredWidth { get { return minWidth; } }
/// <inheritdoc />
public float flexibleWidth { get { return 0; } }
public float flexibleWidth { get { return -1; } }
/// <inheritdoc />
public float minHeight {
get {
return m_isVertical ? (transform as RectTransform).rect.width / m_aspectRatio : 0;
return m_isVertical ? (transform as RectTransform).rect.width / m_aspectRatio : -1;
}
}
/// <inheritdoc />
public float preferredHeight { get { return minHeight; } }
/// <inheritdoc />
public float flexibleHeight { get { return 0; } }
public float flexibleHeight { get { return -1; } }
/// <inheritdoc />
public int layoutPriority { get { return 1; } }
@@ -71,34 +67,46 @@ namespace Cryville.Common.Unity.UI {
/// <inheritdoc />
public void CalculateLayoutInputVertical() { }
protected override void OnDidApplyAnimationProperties() {
base.OnDidApplyAnimationProperties();
SetDirty();
}
protected override void OnDisable() {
SetDirty();
base.OnDisable();
}
protected override void OnEnable() {
base.OnEnable();
SetDirty();
}
protected override void OnRectTransformDimensionsChange() {
base.OnRectTransformDimensionsChange();
protected override void OnBeforeTransformParentChanged() {
base.OnBeforeTransformParentChanged();
SetDirty();
}
protected override void OnTransformParentChanged() {
base.OnTransformParentChanged();
SetDirty();
}
// Overriding fails compiler
new void OnValidate() {
protected override void OnDidApplyAnimationProperties() {
base.OnDidApplyAnimationProperties();
SetDirty();
}
#if UNITY_EDITOR
protected override void OnValidate() {
base.OnValidate();
SetDirty();
}
#endif
protected override void OnDisable() {
SetDirty();
base.OnDisable();
}
protected override void OnRectTransformDimensionsChange() {
base.OnRectTransformDimensionsChange();
SetDirty();
}
bool _delayedSetDirty;
private void SetDirty() {
if (!IsActive()) return;
if (CanvasUpdateRegistry.IsRebuildingLayout()) _delayedSetDirty = true;
else LayoutRebuilder.MarkLayoutForRebuild(transform as RectTransform);
}
void Update() {
if (!_delayedSetDirty) return;
_delayedSetDirty = false;
LayoutRebuilder.MarkLayoutForRebuild(transform as RectTransform);
}
}
}

View File

@@ -0,0 +1,18 @@
using UnityEngine;
namespace Cryville.Common.Unity.UI {
[ExecuteAlways]
[RequireComponent(typeof(CanvasRenderer))]
public class CanvasRendererColorLinker : MonoBehaviour {
[SerializeField] CanvasRenderer m_source;
CanvasRenderer _target;
void Awake() {
_target = GetComponent<CanvasRenderer>();
}
void Update() {
if (m_source == null) return;
_target.SetColor(m_source.GetColor());
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5f490a9cc1b652746b3062810e200ec5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -56,38 +56,28 @@ namespace Cryville.Common.Unity.UI {
set { m_compact = value; }
}
[SerializeField]
[Tooltip("Whether the sprite is vertical.")]
private bool m_isVertical;
/// <summary>
/// Whether the sprite is vertical.
/// </summary>
public bool IsVertical {
get { return m_isVertical; }
set { m_isVertical = value; }
}
public override Texture mainTexture {
get { return Sprite == null ? s_WhiteTexture : Sprite.texture; }
}
void GetCornerLength(int axis, int corner, Vector4 uv, out float length, out float uvLength) {
float border = Sprite.border[(corner << 1) | axis];
float sizeRatio = border / (axis == 0 ? Sprite.rect.height : Sprite.rect.width);
length = sizeRatio * (axis == 0 ? rectTransform.rect.height : rectTransform.rect.width);
uvLength = (uv[(axis ^ 1) | 2] - uv[axis ^ 1]) * (border / (axis == 0 ? Sprite.rect.width : Sprite.rect.height));
}
protected override void OnPopulateMesh(VertexHelper vh) {
float actualWidth = rectTransform.rect.width;
Vector4 uv = DataUtility.GetOuterUV(Sprite);
float cornerLeftSizeRatio = Sprite.border.x / Sprite.rect.height;
float actualLeftCornerWidth = cornerLeftSizeRatio * rectTransform.rect.height;
float actualLeftUVWidth = (uv.w - uv.y) * (Sprite.border.x / Sprite.rect.width);
float cornerRightSizeRatio = Sprite.border.z / Sprite.rect.height;
float actualRightCornerWidth = cornerRightSizeRatio * rectTransform.rect.height;
float actualRightUVWidth = (uv.w - uv.y) * (Sprite.border.z / Sprite.rect.width);
float actualTotalCornerWidth = actualLeftCornerWidth + actualRightCornerWidth;
Vector2 corner1 = new Vector2(0f, 0f);
Vector2 corner2 = new Vector2(1f, 1f);
corner1.x -= rectTransform.pivot.x;
corner1.y -= rectTransform.pivot.y;
corner2.x -= rectTransform.pivot.x;
corner2.y -= rectTransform.pivot.y;
corner1.x *= actualWidth;
corner1.y *= rectTransform.rect.height;
corner2.x *= actualWidth;
corner2.y *= rectTransform.rect.height;
if (Sprite == null) {
throw new UnityException("No sprite");
}
@@ -95,51 +85,87 @@ namespace Cryville.Common.Unity.UI {
throw new UnityException("No sprite border");
}
int axis = IsVertical ? 1 : 0;
float actualLength = axis == 0 ? rectTransform.rect.width : rectTransform.rect.height;
Vector4 uv = DataUtility.GetOuterUV(Sprite);
GetCornerLength(axis, 0, uv, out var actualStartCornerLength, out var actualStartUVWidth);
GetCornerLength(axis, 1, uv, out var actualEndCornerLength, out var actualEndUVLength);
float actualTotalCornerLength = actualStartCornerLength + actualEndCornerLength;
float w3, w4, w5, w6;
if (actualTotalCornerWidth > actualWidth) {
if (actualTotalCornerLength > actualLength) {
switch (Compact) {
case CompactMode.SqueezeBoth:
w3 = w4 = actualLeftCornerWidth / actualTotalCornerWidth * actualWidth;
w5 = w6 = actualRightCornerWidth / actualTotalCornerWidth * actualWidth;
w3 = w4 = actualStartCornerLength / actualTotalCornerLength * actualLength;
w5 = w6 = actualEndCornerLength / actualTotalCornerLength * actualLength;
break;
case CompactMode.SqueezeLeft:
w3 = w4 = actualWidth - actualRightCornerWidth;
w5 = w6 = actualRightCornerWidth;
w3 = w4 = actualLength - actualEndCornerLength;
w5 = w6 = actualEndCornerLength;
break;
case CompactMode.SqueezeRight:
w3 = w4 = actualLeftCornerWidth;
w5 = w6 = actualWidth - actualLeftCornerWidth;
w3 = w4 = actualStartCornerLength;
w5 = w6 = actualLength - actualStartCornerLength;
break;
case CompactMode.DiagonalLeft:
w3 = actualLeftCornerWidth;
w4 = actualWidth - actualRightCornerWidth;
w5 = actualWidth - actualLeftCornerWidth;
w6 = actualRightCornerWidth;
w3 = actualStartCornerLength;
w4 = actualLength - actualEndCornerLength;
w5 = actualLength - actualStartCornerLength;
w6 = actualEndCornerLength;
break;
case CompactMode.DiagonalRight:
w3 = actualWidth - actualRightCornerWidth;
w4 = actualLeftCornerWidth;
w5 = actualRightCornerWidth;
w6 = actualWidth - actualLeftCornerWidth;
w3 = actualLength - actualEndCornerLength;
w4 = actualStartCornerLength;
w5 = actualEndCornerLength;
w6 = actualLength - actualStartCornerLength;
break;
default:
throw new ArgumentOutOfRangeException("Compact");
}
}
else {
w3 = w4 = actualLeftCornerWidth;
w5 = w6 = actualRightCornerWidth;
w3 = w4 = actualStartCornerLength;
w5 = w6 = actualEndCornerLength;
}
Vector2 corner1 = Vector2.zero;
Vector2 corner2 = Vector2.one;
corner1.x -= rectTransform.pivot[axis];
corner1.y -= rectTransform.pivot[axis ^ 1];
corner2.x -= rectTransform.pivot[axis];
corner2.y -= rectTransform.pivot[axis ^ 1];
corner1.x *= actualLength;
corner1.y *= axis == 0 ? rectTransform.rect.height : rectTransform.rect.width;
corner2.x *= actualLength;
corner2.y *= axis == 0 ? rectTransform.rect.height : rectTransform.rect.width;
vh.Clear();
vh.AddVert(new Vector3(corner1.x, corner2.y), color, new Vector2(uv.x, uv.w));
vh.AddVert(new Vector3(corner1.x, corner1.y), color, new Vector2(uv.x, uv.y));
vh.AddVert(new Vector3(corner1.x + w3, corner2.y), color, new Vector2(uv.x + actualLeftUVWidth, uv.w));
vh.AddVert(new Vector3(corner1.x + w4, corner1.y), color, new Vector2(uv.x + actualLeftUVWidth, uv.y));
vh.AddVert(new Vector3(corner2.x - w5, corner2.y), color, new Vector2(uv.z - actualRightUVWidth, uv.w));
vh.AddVert(new Vector3(corner2.x - w6, corner1.y), color, new Vector2(uv.z - actualRightUVWidth, uv.y));
vh.AddVert(new Vector3(corner2.x, corner2.y), color, new Vector2(uv.z, uv.w));
vh.AddVert(new Vector3(corner2.x, corner1.y), color, new Vector2(uv.z, uv.y));
if (axis == 0) {
vh.AddVert(new Vector3(corner1.x, corner2.y), color, new Vector2(uv.x, uv.w));
vh.AddVert(new Vector3(corner1.x, corner1.y), color, new Vector2(uv.x, uv.y));
vh.AddVert(new Vector3(corner1.x + w3, corner2.y), color, new Vector2(uv.x + actualStartUVWidth, uv.w));
vh.AddVert(new Vector3(corner1.x + w4, corner1.y), color, new Vector2(uv.x + actualStartUVWidth, uv.y));
vh.AddVert(new Vector3(corner2.x - w5, corner2.y), color, new Vector2(uv.z - actualEndUVLength, uv.w));
vh.AddVert(new Vector3(corner2.x - w6, corner1.y), color, new Vector2(uv.z - actualEndUVLength, uv.y));
vh.AddVert(new Vector3(corner2.x, corner2.y), color, new Vector2(uv.z, uv.w));
vh.AddVert(new Vector3(corner2.x, corner1.y), color, new Vector2(uv.z, uv.y));
}
else {
vh.AddVert(new Vector3(corner1.y, corner1.x), color, new Vector2(uv.x, uv.w));
vh.AddVert(new Vector3(corner2.y, corner1.x), color, new Vector2(uv.z, uv.w));
vh.AddVert(new Vector3(corner1.y, corner1.x + w4), color, new Vector2(uv.x, uv.w - actualStartUVWidth));
vh.AddVert(new Vector3(corner2.y, corner1.x + w3), color, new Vector2(uv.z, uv.w - actualStartUVWidth));
vh.AddVert(new Vector3(corner1.y, corner2.x - w6), color, new Vector2(uv.x, uv.y + actualEndUVLength));
vh.AddVert(new Vector3(corner2.y, corner2.x - w5), color, new Vector2(uv.z, uv.y + actualEndUVLength));
vh.AddVert(new Vector3(corner1.y, corner2.x), color, new Vector2(uv.x, uv.y));
vh.AddVert(new Vector3(corner2.y, corner2.x), color, new Vector2(uv.z, uv.y));
}
if (((int)Compact & 0x1) == 0) {
vh.AddTriangle(2, 1, 0);

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using UnityEngine.EventSystems;
namespace Cryville.Common.Unity.UI {
[ExecuteAlways]
[RequireComponent(typeof(RectTransform))]
public class SafeArea : UIBehaviour {
bool _delayedUpdate;
#if UNITY_EDITOR
protected override void OnValidate() {
_delayedUpdate = true;
}
#endif
void Update() {
if (_delayedUpdate) {
_delayedUpdate = false;
UpdateRect();
}
}
protected override void OnRectTransformDimensionsChange() {
base.OnRectTransformDimensionsChange();
UpdateRect();
}
protected override void OnTransformParentChanged() {
base.OnTransformParentChanged();
UpdateRect();
}
void UpdateRect() {
var safeArea = Screen.safeArea;
var rectTransform = transform as RectTransform;
var canvas = GetComponentInParent<Canvas>(true).transform as RectTransform;
RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas, new Vector2(safeArea.xMin, safeArea.yMin), Camera.main, out var pt1);
RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas, new Vector2(safeArea.xMax, safeArea.yMax), Camera.main, out var pt2);
var result = Rect.MinMaxRect(pt1.x, pt1.y, pt2.x, pt2.y);
rectTransform.anchoredPosition = result.center;
rectTransform.sizeDelta = result.size;
rectTransform.anchorMin = rectTransform.anchorMax = rectTransform.pivot = new Vector2(0.5f, 0.5f);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 112824c0b55202c4f9c779de7574b5fd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -113,7 +113,7 @@ namespace Cryville.Common.Unity.UI {
private bool initialized;
private GameObject[][] lines;
private int[] refl;
Vector2 cpos = new Vector2(0, 1);
Vector2 cpos = new(0, 1);
Vector2 pprectsize;
#pragma warning disable IDE0051
@@ -134,9 +134,13 @@ namespace Cryville.Common.Unity.UI {
private void OnFrameUpdate() {
if (!initialized) return;
if (lines != null) for (int i = 0; i < lines.Length; i++)
if (lines[i] != null) foreach (GameObject c in lines[i])
GameObject.Destroy(c);
if (lines != null) {
for (int i = 0; i < lines.Length; i++) {
if (lines[i] != null) {
foreach (GameObject c in lines[i]) Destroy(c);
}
}
}
lines = new GameObject[VisibleLines][];
refl = new int[VisibleLines];
for (int i = 0; i < refl.Length; i++) refl[i] = i;
@@ -153,8 +157,9 @@ namespace Cryville.Common.Unity.UI {
private void ResetLines() {
for (int i = 0; i < lines.Length; i++) {
if (lines[i] != null) foreach (GameObject c in lines[i])
GameObject.Destroy(c);
if (lines[i] != null) {
foreach (GameObject c in lines[i]) Destroy(c);
}
lines[i] = new GameObject[LineItemCount];
GenerateLine(i, refl[i]);
}
@@ -200,7 +205,7 @@ namespace Cryville.Common.Unity.UI {
void GenerateLine(int index, int line) {
for (int j = 0; j < LineItemCount; j++) {
var child = GameObject.Instantiate(m_itemTemplate, transform, false);
var child = Instantiate(m_itemTemplate, transform, false);
lines[index][j] = child;
}
LoadLine(index, line);

View File

@@ -0,0 +1,94 @@
using UnityEngine;
using UnityEngine.UI;
namespace Cryville.Common.Unity.UI {
[AddComponentMenu("Layout/Single Layout Group")]
[ExecuteAlways]
public class SingleLayoutGroup : LayoutGroup {
[SerializeField]
protected bool m_ChildForceExpandWidth = true;
[SerializeField]
protected bool m_ChildForceExpandHeight = true;
[SerializeField]
protected bool m_ChildControlWidth = true;
[SerializeField]
protected bool m_ChildControlHeight = true;
[SerializeField]
protected bool m_ChildScaleWidth;
[SerializeField]
protected bool m_ChildScaleHeight;
public override void CalculateLayoutInputHorizontal() {
base.CalculateLayoutInputHorizontal();
CalcAlongAxis(0);
}
public override void CalculateLayoutInputVertical() { CalcAlongAxis(1); }
public override void SetLayoutHorizontal() { SetChildrenAlongAxis(0); }
public override void SetLayoutVertical() { SetChildrenAlongAxis(1); }
protected void CalcAlongAxis(int axis) {
float combinedPadding = (axis == 0) ? padding.horizontal : padding.vertical;
bool controlSize = (axis == 0) ? m_ChildControlWidth : m_ChildControlHeight;
bool useScale = (axis == 0) ? m_ChildScaleWidth : m_ChildScaleHeight;
bool childForceExpandSize = (axis == 0) ? m_ChildForceExpandWidth : m_ChildForceExpandHeight;
float totalMin = combinedPadding;
float totalPreferred = combinedPadding;
float totalFlexible = 0f;
RectTransform child = rectChildren[0];
GetChildSizes(child, axis, controlSize, childForceExpandSize, out var min, out var preferred, out var flexible);
if (useScale) {
float scaleFactor = child.localScale[axis];
min *= scaleFactor;
preferred *= scaleFactor;
flexible *= scaleFactor;
}
totalMin = Mathf.Max(min + combinedPadding, totalMin);
totalPreferred = Mathf.Max(preferred + combinedPadding, totalPreferred);
totalFlexible = Mathf.Max(flexible, totalFlexible);
totalPreferred = Mathf.Max(totalMin, totalPreferred);
SetLayoutInputForAxis(totalMin, totalPreferred, totalFlexible, axis);
}
protected void SetChildrenAlongAxis(int axis) {
float size = rectTransform.rect.size[axis];
bool controlSize = (axis == 0) ? m_ChildControlWidth : m_ChildControlHeight;
bool useScale = (axis == 0) ? m_ChildScaleWidth : m_ChildScaleHeight;
bool childForceExpandSize = (axis == 0) ? m_ChildForceExpandWidth : m_ChildForceExpandHeight;
float alignmentOnAxis = GetAlignmentOnAxis(axis);
float innerSize = size - ((axis == 0) ? padding.horizontal : padding.vertical);
RectTransform child = rectChildren[0];
GetChildSizes(child, axis, controlSize, childForceExpandSize, out var min2, out var preferred2, out var flexible2);
float scaleFactor2 = useScale ? child.localScale[axis] : 1f;
float requiredSpace = Mathf.Clamp(innerSize, min2, (flexible2 > 0f) ? size : preferred2);
float startOffset = GetStartOffset(axis, requiredSpace * scaleFactor2);
if (controlSize) {
SetChildAlongAxisWithScale(child, axis, startOffset, requiredSpace, scaleFactor2);
}
else {
float offsetInCell2 = (requiredSpace - child.sizeDelta[axis]) * alignmentOnAxis;
SetChildAlongAxisWithScale(child, axis, startOffset + offsetInCell2, scaleFactor2);
}
}
void GetChildSizes(RectTransform child, int axis, bool controlSize, bool childForceExpand, out float min, out float preferred, out float flexible) {
if (!controlSize) {
min = child.sizeDelta[axis];
preferred = min;
flexible = 0f;
}
else {
min = LayoutUtility.GetMinSize(child, axis);
preferred = LayoutUtility.GetPreferredSize(child, axis);
flexible = LayoutUtility.GetFlexibleSize(child, axis);
}
if (childForceExpand) {
flexible = Mathf.Max(flexible, 1f);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5d03df0bb58478e42935bbdf633a4aa4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,6 +1,8 @@
using Cryville.Common.Font;
using Cryville.Culture;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using TMPro;
using UnityEngine;
@@ -22,19 +24,20 @@ namespace Cryville.Common.Unity.UI {
if (FontMatcher == null) return;
_text = GetComponent<TextMeshProUGUI>();
if (_font == null) {
foreach (var typeface in FontMatcher.MatchScript(null, true)) {
foreach (var typeface in FontMatcher.MatchLanguage(new LanguageId(CultureInfo.CurrentCulture.Name), true)) {
try {
var ifont = CreateFontAsset(typeface.File.FullName, typeface.IndexInFile);
if (m_shader) ifont.material.shader = m_shader;
else if (DefaultShader) ifont.material.shader = DefaultShader;
if (_font == null) {
_font = ifont;
Shared.Logger.Log(1, "UI", "Using main font: {0}", typeface.FullName);
if (MaxFallbackCount <= 0) break;
}
else {
if (_font.fallbackFontAssetTable == null)
_font.fallbackFontAssetTable = new List<FontAsset>();
_font.fallbackFontAssetTable ??= new List<FontAsset>();
_font.fallbackFontAssetTable.Add(ifont);
Shared.Logger.Log(1, "UI", "Using fallback font #{0}: {1}", _font.fallbackFontAssetTable.Count, typeface.FullName);
if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
}
}

View File

@@ -0,0 +1,62 @@
using System;
using System.Runtime.InteropServices;
namespace Cryville.Common.Unity {
public static class UrlOpener {
public static void Open(string url) {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
url += "\0";
unsafe {
fixed (char* lpFile = url) {
var info = new SHELLEXECUTEINFOW {
cbSize = (uint)sizeof(SHELLEXECUTEINFOW),
fMask = 0x0540,
lpFile = lpFile,
nShow = 1,
};
ShellExecuteExW(ref info);
}
}
#elif UNITY_ANDROID
using (var clazz = new UnityEngine.AndroidJavaClass("world.cryville.common.unity.UrlOpener")) {
clazz.CallStatic("open", url);
}
#else
#error Unknown platform.
#endif
}
public static void OpenThreaded(string url) {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
Open(url);
#elif UNITY_ANDROID
UnityEngine.AndroidJNI.AttachCurrentThread();
Open(url);
UnityEngine.AndroidJNI.DetachCurrentThread();
#else
#error Unknown platform.
#endif
}
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
[DllImport("shell32.dll")]
static extern void ShellExecuteExW(ref SHELLEXECUTEINFOW pExecInfo);
unsafe struct SHELLEXECUTEINFOW {
public uint cbSize;
public uint fMask;
public IntPtr hwnd;
public char* lpVerb;
public char* lpFile;
public char* lpParameters;
public char* lpDirectory;
public int nShow;
public IntPtr hInstApp;
public IntPtr lpIDList;
public IntPtr lpClass;
public IntPtr hkeyClass;
public uint dwHotKey;
public IntPtr hIconMonitor;
public IntPtr hProcess;
}
#endif
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c827ee181de8c51499777e5a822981b8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
package world.cryville.common.unity;
import android.content.Intent;
import android.net.Uri;
import com.unity3d.player.UnityPlayer;
import com.unity3d.player.UnityPlayerActivity;
public final class UrlOpener {
private UrlOpener() { }
static UnityPlayerActivity activity;
public static void open(String url) {
if (activity == null) activity = (UnityPlayerActivity)UnityPlayer.currentActivity;
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
}

View File

@@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: e2d08ba79acb0564b9802b57dbc2f8d3
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,4 +1,5 @@
using Cryville.Common.Collections.Specialized;
using Cryville.Crtr.Skin;
using UnityEngine;
namespace Cryville.Crtr {

View File

@@ -25,7 +25,7 @@ namespace Cryville.Crtr {
public int d;
[JsonIgnore]
public double Decimal { get { return b + (double)n / d; } }
public readonly double Decimal { get { return b + (double)n / d; } }
public int CompareTo(BeatTime other) {
var c = b.CompareTo(other.b);
@@ -34,15 +34,15 @@ namespace Cryville.Crtr {
}
public override bool Equals(object obj) {
if (!(obj is BeatTime)) return false;
return Equals((BeatTime)obj);
if (obj is not BeatTime other) return false;
return Equals(other);
}
public bool Equals(BeatTime other) {
return b.Equals(other.b) && ((double)n / d).Equals((double)other.n / other.d);
}
public override int GetHashCode() {
public override readonly int GetHashCode() {
return Decimal.GetHashCode();
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3f8950bbcf5338b408696d041cb62114
guid: 8da681baa9e0364429f4ff80b3cdcf79
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cryville.Crtr.Browsing.Actions {
public class ActionManager {
readonly Dictionary<Type, List<IResourceAction>> _actions = new();
readonly Dictionary<IResourceAction, int> _refCounts = new();
public event Action Changed;
class ActionPriorityComparer : IComparer<IResourceAction> {
public static readonly ActionPriorityComparer Instance = new();
public int Compare(IResourceAction x, IResourceAction y) {
return x.Priority.CompareTo(y.Priority);
}
}
void Register(Type type, IResourceAction action) {
if (!_actions.TryGetValue(type, out List<IResourceAction> actions)) {
_actions.Add(type, actions = new List<IResourceAction>());
}
int index = actions.BinarySearch(action, ActionPriorityComparer.Instance);
if (index < 0) index = ~index;
actions.Insert(index, action);
if (_refCounts.ContainsKey(action)) _refCounts[action]++;
else _refCounts[action] = 1;
Changed?.Invoke();
}
public void Register(IResourceAction action) {
Register(typeof(object), action);
}
public void Register<T>(IResourceAction<T> action) where T : IResourceMeta {
Register(typeof(T), action);
}
public void Unregister(Type type, IResourceAction action) {
if (!_actions.TryGetValue(type, out List<IResourceAction> actions)) return;
if (--_refCounts[action] > 0) return;
actions.Remove(action);
Changed?.Invoke();
}
public void Unregister(IResourceAction action) {
Unregister(typeof(object), action);
}
public void Unregister<T>(IResourceAction<T> action) where T : IResourceMeta {
Unregister(typeof(T), action);
}
public IEnumerable<IResourceAction> GetActions(Uri uri, IResourceMeta res) {
return GetActions(uri, res, res.GetType());
}
IEnumerable<IResourceAction> GetActions(Uri uri, IResourceMeta res, Type type) {
if (type == null) return Enumerable.Empty<IResourceAction>();
IEnumerable<IResourceAction> result;
if (_actions.TryGetValue(type, out List<IResourceAction> actions))
result = actions.Where(i => i.CanInvoke(uri, res));
else
result = Enumerable.Empty<IResourceAction>();
if (type != typeof(object))
result = result
.Concat(GetActions(uri, res, type.BaseType))
.Concat(type.GetInterfaces().SelectMany(i => GetActions(uri, res, i)));
return result;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 47b543be94fb27542a312561b5cf2b71
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Cryville.Crtr.Browsing.Actions {
public interface IResourceAction {
string Name { get; }
int Priority { get; }
bool CanInvoke(Uri uri, IResourceMeta resource);
void Invoke(Uri uri, IResourceMeta resource);
}
public interface IResourceAction<T> : IResourceAction where T : IResourceMeta {
bool CanInvoke(Uri uri, T resource);
void Invoke(Uri uri, T resource);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 06644fed46df1e3479274e77d7050770
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
using Cryville.Crtr.UI;
using System;
namespace Cryville.Crtr.Browsing.Actions {
internal class ImportResourceAction : IResourceAction {
readonly IResourceDestination _destination;
public ImportResourceAction(IResourceDestination destination) {
_destination = destination;
}
public string Name { get { return "Import"; } }
public int Priority { get { return 0; } }
public bool CanInvoke(Uri uri, IResourceMeta resource) {
return _destination.CanImport(uri);
}
public void Invoke(Uri uri, IResourceMeta resource) {
if (_destination.ImportFrom(uri))
Popup.Create("Import succeeded");
else
Popup.Create("Import failed");
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 051f1b92e4abcdc48a3de86ddf3838ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,43 @@
using Cryville.Crtr.Browsing.UI;
using Cryville.Crtr.Config;
using System;
using System.Collections.Generic;
using Object = UnityEngine.Object;
namespace Cryville.Crtr.Browsing.Actions {
internal class OpenConfigAction : ResourceAction<IChartDetail> {
public override string Name { get { return "Config"; } }
public override int Priority { get { return -50; } }
static readonly Dictionary<string, int> _rulesetTabs = new();
public override bool CanInvoke(Uri uri, IChartDetail resource) {
return true;
}
public override void Invoke(Uri uri, IChartDetail resource) {
Invoke(resource.RulesetId);
}
public static bool HasTab(string ruleset) {
var master = ResourceBrowserMaster.Instance;
if (master == null) return false;
return _rulesetTabs.TryGetValue(ruleset, out int tabId) && master.HasTab(tabId);
}
public static void Invoke(string ruleset, Action<RulesetConfig> overrides = null) {
var master = ResourceBrowserMaster.Instance;
if (_rulesetTabs.TryGetValue(ruleset, out int tabId) && master.TryOpenTab(tabId))
return;
var browser = Object.Instantiate(master.m_configBrowserPrefab).GetComponent<RulesetConfigBrowser>();
try {
browser.Load(ruleset, overrides);
}
catch (Exception) {
Object.Destroy(browser.gameObject);
throw;
}
_rulesetTabs[ruleset] = master.AddAndOpenTab(string.Format("{0} (Config)", ruleset), browser);
browser.InitAction();
}
}
}

Some files were not shown because too many files have changed in this diff Show More