121 Commits

Author SHA1 Message Date
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
439 changed files with 40427 additions and 31687 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,8 +0,0 @@
fileFormatVersion: 2
guid: d815e4d844e6a1c4d849e96e199f8881
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

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

@@ -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

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

View File

@@ -1,4 +1,4 @@
using Cryville.Common.Culture; using Cryville.Culture;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -7,20 +7,22 @@ namespace Cryville.Common.Font {
public abstract class FontMatcher { public abstract class FontMatcher {
protected FontManager Manager { get; private set; } protected FontManager Manager { get; private set; }
public FontMatcher(FontManager manager) { Manager = manager; } public FontMatcher(FontManager manager) { Manager = manager; }
public abstract IEnumerable<Typeface> MatchScript(string script = null, bool distinctFamily = false); public abstract IEnumerable<Typeface> MatchLanguage(LanguageId lang, bool distinctFamily = false);
} }
public class FallbackListFontMatcher : FontMatcher { public class FallbackListFontMatcher : FontMatcher {
readonly LanguageMatching _matcher;
static readonly string UltimateFallbackScript = "zzzz";
public Dictionary<string, List<string>> MapScriptToTypefaces = new Dictionary<string, List<string>>(); public Dictionary<string, List<string>> MapScriptToTypefaces = new Dictionary<string, List<string>>();
public static Dictionary<string, List<string>> GetDefaultWindowsFallbackMap() { public static Dictionary<string, List<string>> GetDefaultWindowsFallbackMap() {
var map = new Dictionary<string, List<string>>(); var map = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
ScriptUtils.FillKeysWithScripts(map, () => new List<string>()); FillKeysWithScripts(map, () => new List<string>());
// Reference: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc // Reference: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc
map["zyyy"].Insert(0, "SimSun"); // Custom map[UltimateFallbackScript].Insert(0, "SimSun"); // Custom
map["zyyy"].Insert(0, "SimHei"); // Custom map[UltimateFallbackScript].Insert(0, "SimHei"); // Custom
map["zyyy"].Insert(0, "Microsoft YaHei"); // Custom map[UltimateFallbackScript].Insert(0, "Microsoft YaHei"); // Custom
map["zyyy"].Insert(0, "Arial"); map[UltimateFallbackScript].Insert(0, "Arial");
map["zyyy"].Insert(0, "Times New Roman"); map[UltimateFallbackScript].Insert(0, "Times New Roman");
map["zyyy"].Insert(0, "Segoe UI"); // Custom map[UltimateFallbackScript].Insert(0, "Segoe UI"); // Custom
map["arab"].Insert(0, "Tahoma"); map["arab"].Insert(0, "Tahoma");
map["cyrl"].Insert(0, "Times New Roman"); map["cyrl"].Insert(0, "Times New Roman");
map["grek"].Insert(0, "Times New Roman"); map["grek"].Insert(0, "Times New Roman");
@@ -158,12 +160,12 @@ namespace Cryville.Common.Font {
return map; return map;
} }
public static Dictionary<string, List<string>> GetDefaultAndroidFallbackMap() { public static Dictionary<string, List<string>> GetDefaultAndroidFallbackMap() {
var map = new Dictionary<string, List<string>>(); var map = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
ScriptUtils.FillKeysWithScripts(map, () => new List<string>()); FillKeysWithScripts(map, () => new List<string>());
map["zyyy"].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback map[UltimateFallbackScript].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback
map["zyyy"].Insert(0, "Noto Sans CJK JP"); map[UltimateFallbackScript].Insert(0, "Noto Sans CJK JP");
map["zyyy"].Insert(0, "Noto Sans CJK SC"); map[UltimateFallbackScript].Insert(0, "Noto Sans CJK SC");
map["zyyy"].Insert(0, "Roboto"); map[UltimateFallbackScript].Insert(0, "Roboto");
map["zsye"].Insert(0, "Noto Color Emoji"); map["zsye"].Insert(0, "Noto Color Emoji");
map["zsye"].Add("Noto Color Emoji Flags"); map["zsye"].Add("Noto Color Emoji Flags");
map["arab"].Insert(0, "Noto Naskh Arabic"); map["arab"].Insert(0, "Noto Naskh Arabic");
@@ -275,9 +277,9 @@ namespace Cryville.Common.Font {
map["sund"].Insert(0, "Noto Sans Sundanese"); map["sund"].Insert(0, "Noto Sans Sundanese");
map["sylo"].Insert(0, "Noto Sans Syloti Nagri"); map["sylo"].Insert(0, "Noto Sans Syloti Nagri");
map["zsym"].Insert(0, "Noto Sans Symbols"); map["zsym"].Insert(0, "Noto Sans Symbols");
map["syrn"].Insert(0, "Noto Sans Syriac Eastern"); map["syrc"].Add("Noto Sans Syriac Eastern");
map["syre"].Insert(0, "Noto Sans Syriac Estrangela"); map["syrc"].Add("Noto Sans Syriac Western");
map["syrj"].Insert(0, "Noto Sans Syriac Western"); map["syrc"].Add("Noto Sans Syriac Estrangela");
map["tglg"].Insert(0, "Noto Sans Tagalog"); map["tglg"].Insert(0, "Noto Sans Tagalog");
map["tagb"].Insert(0, "Noto Sans Tagbanwa"); map["tagb"].Insert(0, "Noto Sans Tagbanwa");
map["tale"].Insert(0, "Noto Sans Tai Le"); map["tale"].Insert(0, "Noto Sans Tai Le");
@@ -296,33 +298,47 @@ namespace Cryville.Common.Font {
map["yiii"].Insert(0, "Noto Sans Yi"); map["yiii"].Insert(0, "Noto Sans Yi");
return map; return map;
} }
public FallbackListFontMatcher(FontManager manager) : base(manager) { } static void FillKeysWithScripts<T>(IDictionary<string, T> map, Func<T> value) {
public override IEnumerable<Typeface> MatchScript(string script = null, bool distinctFamily = false) { foreach (var s in IdValidity.Enumerate("script")) map.Add(s, value());
if (string.IsNullOrEmpty(script)) script = ScriptUtils.UltimateFallbackScript; }
List<string> candidates;
IEnumerable<string> candidateScripts = new string[] { script }; public FallbackListFontMatcher(LanguageMatching matcher, FontManager manager) : base(manager) {
while (candidateScripts != null) { _matcher = matcher;
foreach (var candidateScript in candidateScripts) { }
if (MapScriptToTypefaces.TryGetValue(candidateScript, out candidates)) { public override IEnumerable<Typeface> MatchLanguage(LanguageId lang, bool distinctFamily = false) {
foreach (var candidate in candidates) { var supported = MapScriptToTypefaces.Keys.Select(i => new LanguageId(i)).ToList();
IReadOnlyCollection<Typeface> typefaces1; bool flag = false;
if (Manager.MapFullNameToTypeface.TryGetValue(candidate, out typefaces1)) { while (_matcher.Match(lang, supported, out var match, out var distance)) {
foreach (var typeface in typefaces1) { if (distance > 40) break;
yield return typeface; Shared.Logger.Log(0, "UI", "Matching fonts for language {0}, distance = {1}", match, distance);
} if (match.Script.Equals(UltimateFallbackScript, StringComparison.OrdinalIgnoreCase)) {
} flag = true;
if (distinctFamily) continue; }
IReadOnlyCollection<Typeface> typefaces2; var candidates = MapScriptToTypefaces[match.Script];
if (Manager.MapNameToTypefaces.TryGetValue(candidate, out typefaces2)) { foreach (var typeface in EnumerateTypefaces(candidates, distinctFamily)) {
foreach (var typeface in typefaces2) { yield return typeface;
if (typefaces1.Contains(typeface)) continue; }
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;
}
}
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;
IReadOnlyCollection<Typeface> typefaces2;
if (Manager.MapNameToTypefaces.TryGetValue(candidate, out typefaces2)) {
foreach (var typeface in typefaces2) {
if (typeface1 == typeface) continue;
yield return typeface;
} }
} }
candidateScripts = ScriptUtils.EnumerateFallbackScripts(script);
} }
} }
} }

View File

@@ -1,4 +1,3 @@
using Cryville.Common.Logging;
using Microsoft.Win32; using Microsoft.Win32;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -35,7 +34,7 @@ namespace Cryville.Common.Network.Http11 {
origPort = _baseUri.Port; origPort = _baseUri.Port;
Headers = new Dictionary<string, string>(); Headers = new Dictionary<string, string>();
_proxied = GetProxy(ref _directHost, ref _directPort); _proxied = GetProxy(ref _directHost, ref _directPort);
Logger.Log("main", 0, "Network", "Connecting to {0}:{1}", DirectHost, DirectPort); Shared.Logger.Log(0, "Network", "Connecting to {0}:{1}", DirectHost, DirectPort);
TcpClient = new TcpClient(DirectHost, DirectPort); TcpClient = new TcpClient(DirectHost, DirectPort);
} }
@@ -96,7 +95,7 @@ namespace Cryville.Common.Network.Http11 {
writer.Flush(); writer.Flush();
} }
var response = new Http11Response(stream); var response = new Http11Response(stream);
Logger.Log("main", 0, "Network", "{0}", response); Shared.Logger.Log(0, "Network", "{0}", response);
return response; return response;
} }

View File

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

View File

@@ -1,11 +1,10 @@
using Cryville.Common.Collections; using Cryville.Common.Collections;
using Cryville.Common.Logging;
using Cryville.Common.Reflection; using Cryville.Common.Reflection;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text;
using CMath = System.Math; using CMath = System.Math;
namespace Cryville.Common.Pdt { namespace Cryville.Common.Pdt {
@@ -13,23 +12,19 @@ namespace Cryville.Common.Pdt {
/// Interpreter for Property Definition Tree (PDT) file format. /// Interpreter for Property Definition Tree (PDT) file format.
/// </summary> /// </summary>
public partial class PdtInterpreter { public partial class PdtInterpreter {
/// <summary> [Flags]
/// The character category map. protected enum CharCategory {
/// </summary> WhiteSpace = 0x0001,
/// <remarks> Identifier = 0x0010,
/// <list type="bullet"> IdentifierBegin = 0x0020,
/// <item><term><c>0x0001</c></term><description>White Space</description></item> Digit = 0x0040,
/// <item><term><c>0x0010</c></term><description>Identifier</description></item> Operator = 0x0080,
/// <item><term><c>0x0020</c></term><description>Identifier Begin</description></item> StringDelimiter = 0x0100,
/// <item><term><c>0x0040</c></term><description>Digit</description></item> OpeningBracket = 0x0200,
/// <item><term><c>0x0080</c></term><description>Operator</description></item> ClosingBracket = 0x0400,
/// <item><term><c>0x0100</c></term><description>String</description></item> EndOfExpression = 0x0800,
/// <item><term><c>0x0200</c></term><description>Opening Bracket</description></item> EndOfKey = 0x1000,
/// <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>
static readonly int[] cm = new int[] { static readonly int[] cm = new int[] {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F // 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, 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. /// The current position in the string being parsed by the interpreter.
/// </summary> /// </summary>
public int Position { get; protected set; } public int Position { get; protected set; }
readonly StringBuilder _sb = new StringBuilder();
#pragma warning disable IDE1006 #pragma warning disable IDE1006
/// <summary> /// <summary>
/// The character at the current position. /// The character at the current position.
@@ -79,14 +76,14 @@ namespace Cryville.Common.Pdt {
/// The category of the character. /// The category of the character.
/// </summary> /// </summary>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception> /// <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> /// <summary>
/// Reads a token until a character of type <paramref name="flag" /> is met. /// Reads a token until a character of type <paramref name="flag" /> is met.
/// </summary> /// </summary>
/// <param name="flag">The type filter.</param> /// <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> /// <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> /// <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; int sp = Position;
while ((ct & flag) == 0) Position++; while ((ct & flag) == 0) Position++;
return Source.Substring(sp, Position - sp); return Source.Substring(sp, Position - sp);
@@ -97,7 +94,7 @@ namespace Cryville.Common.Pdt {
/// <param name="flag">The type filter.</param> /// <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> /// <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> /// <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; int sp = Position;
while ((ct & flag) != 0) Position++; while ((ct & flag) != 0) Position++;
return Source.Substring(sp, Position - sp); return Source.Substring(sp, Position - sp);
@@ -107,7 +104,7 @@ namespace Cryville.Common.Pdt {
/// </summary> /// </summary>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception> /// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected void ws() { protected void ws() {
while ((ct & 0x0001) != 0) Position++; while ((ct & CharCategory.WhiteSpace) != 0) Position++;
} }
#pragma warning restore IDE1006 #pragma warning restore IDE1006
@@ -127,8 +124,8 @@ namespace Cryville.Common.Pdt {
/// <returns>An identifier.</returns> /// <returns>An identifier.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception> /// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetIdentifier() { protected string GetIdentifier() {
if ((ct & 0x0020) == 0) return ""; if ((ct & CharCategory.IdentifierBegin) == 0) return "";
return tokenw(0x0010); return tokenw(CharCategory.Identifier);
} }
/// <summary> /// <summary>
/// Reads a number. /// Reads a number.
@@ -136,7 +133,7 @@ namespace Cryville.Common.Pdt {
/// <returns>A number.</returns> /// <returns>A number.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception> /// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetNumber() { protected string GetNumber() {
return tokenw(0x0040); return tokenw(CharCategory.Digit);
} }
/// <summary> /// <summary>
/// Reads a string. /// Reads a string.
@@ -144,13 +141,15 @@ namespace Cryville.Common.Pdt {
/// <returns>A string.</returns> /// <returns>A string.</returns>
/// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception> /// <exception cref="IndexOutOfRangeException">The end of the source string is reached.</exception>
protected string GetString() { protected string GetString() {
int sp = Position; _sb.Clear();
do {
if (cc == '\\') Position++;
Position++;
} while (ct != 0x0100);
Position++; 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> /// <summary>
/// Reads an expression. /// Reads an expression.
@@ -203,7 +202,7 @@ namespace Cryville.Common.Pdt {
switch (GetIdentifier()) { switch (GetIdentifier()) {
case "ver": case "ver":
ws(); 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; break;
case "format": case "format":
ws(); ws();
@@ -296,7 +295,7 @@ namespace Cryville.Common.Pdt {
/// </summary> /// </summary>
/// <returns>The interpreted key.</returns> /// <returns>The interpreted key.</returns>
protected virtual object InterpretKey(Type type) { protected virtual object InterpretKey(Type type) {
return tokenb(0x1000).Trim(); return tokenb(CharCategory.EndOfKey).Trim();
} }
} }
/// <summary> /// <summary>

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(T), unit) { }
public Qualified(T value, string unit) {
Value = value;
Unit = unit;
}
public override string ToString() { return ToString("G3"); }
public string ToString(string format) { return ToString(format, null); }
public 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 fileFormatVersion: 2
guid: ae9dab8f520fadc4194032f523ca87c1 guid: 909a28e78d4239f4c9507c3c9128baf2
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 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 Logger();
}
}

View File

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

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 fileFormatVersion: 2
guid: bad1f43573d4f1143a94fddddd30fb81 guid: 0b4037ba4138aae47b8da984f30b4db9
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 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

@@ -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

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f535064222dd08c4f8e52d6e9144079a guid: 9dd02eadcf1c6e745939a75a797c9093
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

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 bool Equals(AttributeBinding other) {
return Component.Equals(other.Component) && Attribute.Equals(other.Attribute);
}
public override bool Equals(object obj) {
return obj is AttributeBinding && Equals((AttributeBinding)obj);
}
public override int GetHashCode() {
return Component.GetHashCode() ^ Attribute.GetHashCode();
}
}
[SerializeField]
StateTweener[] m_children;
readonly List<string> _statePriority = new List<string>();
readonly Dictionary<AttributeBinding, object> _defaults = new Dictionary<AttributeBinding, object>();
readonly Dictionary<AttributeBinding, PropertyTweener<object>> _tweeners = new Dictionary<AttributeBinding, PropertyTweener<object>>();
readonly Dictionary<string, Dictionary<AttributeBinding, object>> _runtimeStates = new Dictionary<string, Dictionary<AttributeBinding, object>>();
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 List<string>();
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[m_cState.Count - 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> /// <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. /// 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> /// </summary>
[ExecuteAlways]
public class AspectRatioLayoutElement : UIBehaviour, ILayoutElement { public class AspectRatioLayoutElement : UIBehaviour, ILayoutElement {
[SerializeField] [SerializeField]
[Tooltip("The aspect ratio. Width divided by height.")] [Tooltip("The aspect ratio. Width divided by height.")]
@@ -35,32 +36,27 @@ namespace Cryville.Common.Unity.UI {
SetDirty(); SetDirty();
} }
private void SetDirty() {
if (!IsActive()) return;
LayoutRebuilder.MarkLayoutForRebuild(transform as RectTransform);
}
/// <inheritdoc /> /// <inheritdoc />
public float minWidth { public float minWidth {
get { get {
return m_isVertical ? 0 : (transform as RectTransform).rect.height * m_aspectRatio; return m_isVertical ? -1 : (transform as RectTransform).rect.height * m_aspectRatio;
} }
} }
/// <inheritdoc /> /// <inheritdoc />
public float preferredWidth { get { return minWidth; } } public float preferredWidth { get { return minWidth; } }
/// <inheritdoc /> /// <inheritdoc />
public float flexibleWidth { get { return 0; } } public float flexibleWidth { get { return -1; } }
/// <inheritdoc /> /// <inheritdoc />
public float minHeight { public float minHeight {
get { get {
return m_isVertical ? (transform as RectTransform).rect.width / m_aspectRatio : 0; return m_isVertical ? (transform as RectTransform).rect.width / m_aspectRatio : -1;
} }
} }
/// <inheritdoc /> /// <inheritdoc />
public float preferredHeight { get { return minHeight; } } public float preferredHeight { get { return minHeight; } }
/// <inheritdoc /> /// <inheritdoc />
public float flexibleHeight { get { return 0; } } public float flexibleHeight { get { return -1; } }
/// <inheritdoc /> /// <inheritdoc />
public int layoutPriority { get { return 1; } } public int layoutPriority { get { return 1; } }
@@ -71,34 +67,46 @@ namespace Cryville.Common.Unity.UI {
/// <inheritdoc /> /// <inheritdoc />
public void CalculateLayoutInputVertical() { } public void CalculateLayoutInputVertical() { }
protected override void OnDidApplyAnimationProperties() {
base.OnDidApplyAnimationProperties();
SetDirty();
}
protected override void OnDisable() {
SetDirty();
base.OnDisable();
}
protected override void OnEnable() { protected override void OnEnable() {
base.OnEnable(); base.OnEnable();
SetDirty(); SetDirty();
} }
protected override void OnBeforeTransformParentChanged() {
protected override void OnRectTransformDimensionsChange() { base.OnBeforeTransformParentChanged();
base.OnRectTransformDimensionsChange();
SetDirty(); SetDirty();
} }
protected override void OnTransformParentChanged() { protected override void OnTransformParentChanged() {
base.OnTransformParentChanged(); base.OnTransformParentChanged();
SetDirty(); SetDirty();
} }
protected override void OnDidApplyAnimationProperties() {
// Overriding fails compiler base.OnDidApplyAnimationProperties();
new void OnValidate() {
SetDirty(); 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

@@ -56,38 +56,28 @@ namespace Cryville.Common.Unity.UI {
set { m_compact = value; } 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 { public override Texture mainTexture {
get { return Sprite == null ? s_WhiteTexture : Sprite.texture; } 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) { 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) { if (Sprite == null) {
throw new UnityException("No sprite"); throw new UnityException("No sprite");
} }
@@ -95,51 +85,87 @@ namespace Cryville.Common.Unity.UI {
throw new UnityException("No sprite border"); 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; float w3, w4, w5, w6;
if (actualTotalCornerWidth > actualWidth) { if (actualTotalCornerLength > actualLength) {
switch (Compact) { switch (Compact) {
case CompactMode.SqueezeBoth: case CompactMode.SqueezeBoth:
w3 = w4 = actualLeftCornerWidth / actualTotalCornerWidth * actualWidth; w3 = w4 = actualStartCornerLength / actualTotalCornerLength * actualLength;
w5 = w6 = actualRightCornerWidth / actualTotalCornerWidth * actualWidth; w5 = w6 = actualEndCornerLength / actualTotalCornerLength * actualLength;
break; break;
case CompactMode.SqueezeLeft: case CompactMode.SqueezeLeft:
w3 = w4 = actualWidth - actualRightCornerWidth; w3 = w4 = actualLength - actualEndCornerLength;
w5 = w6 = actualRightCornerWidth; w5 = w6 = actualEndCornerLength;
break; break;
case CompactMode.SqueezeRight: case CompactMode.SqueezeRight:
w3 = w4 = actualLeftCornerWidth; w3 = w4 = actualStartCornerLength;
w5 = w6 = actualWidth - actualLeftCornerWidth; w5 = w6 = actualLength - actualStartCornerLength;
break; break;
case CompactMode.DiagonalLeft: case CompactMode.DiagonalLeft:
w3 = actualLeftCornerWidth; w3 = actualStartCornerLength;
w4 = actualWidth - actualRightCornerWidth; w4 = actualLength - actualEndCornerLength;
w5 = actualWidth - actualLeftCornerWidth; w5 = actualLength - actualStartCornerLength;
w6 = actualRightCornerWidth; w6 = actualEndCornerLength;
break; break;
case CompactMode.DiagonalRight: case CompactMode.DiagonalRight:
w3 = actualWidth - actualRightCornerWidth; w3 = actualLength - actualEndCornerLength;
w4 = actualLeftCornerWidth; w4 = actualStartCornerLength;
w5 = actualRightCornerWidth; w5 = actualEndCornerLength;
w6 = actualWidth - actualLeftCornerWidth; w6 = actualLength - actualStartCornerLength;
break; break;
default: default:
throw new ArgumentOutOfRangeException("Compact"); throw new ArgumentOutOfRangeException("Compact");
} }
} }
else { else {
w3 = w4 = actualLeftCornerWidth; w3 = w4 = actualStartCornerLength;
w5 = w6 = actualRightCornerWidth; 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.Clear();
vh.AddVert(new Vector3(corner1.x, corner2.y), color, new Vector2(uv.x, uv.w)); if (axis == 0) {
vh.AddVert(new Vector3(corner1.x, corner1.y), color, new Vector2(uv.x, uv.y)); vh.AddVert(new Vector3(corner1.x, corner2.y), color, new Vector2(uv.x, uv.w));
vh.AddVert(new Vector3(corner1.x + w3, corner2.y), color, new Vector2(uv.x + actualLeftUVWidth, uv.w)); vh.AddVert(new Vector3(corner1.x, corner1.y), color, new Vector2(uv.x, uv.y));
vh.AddVert(new Vector3(corner1.x + w4, corner1.y), color, new Vector2(uv.x + actualLeftUVWidth, uv.y)); vh.AddVert(new Vector3(corner1.x + w3, corner2.y), color, new Vector2(uv.x + actualStartUVWidth, uv.w));
vh.AddVert(new Vector3(corner2.x - w5, corner2.y), color, new Vector2(uv.z - actualRightUVWidth, 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 - w6, corner1.y), color, new Vector2(uv.z - actualRightUVWidth, 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, corner2.y), color, new Vector2(uv.z, 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, corner1.y), color, new Vector2(uv.z, 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) { if (((int)Compact & 0x1) == 0) {
vh.AddTriangle(2, 1, 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

@@ -134,9 +134,13 @@ namespace Cryville.Common.Unity.UI {
private void OnFrameUpdate() { private void OnFrameUpdate() {
if (!initialized) return; if (!initialized) return;
if (lines != null) for (int i = 0; i < lines.Length; i++) if (lines != null) {
if (lines[i] != null) foreach (GameObject c in lines[i]) for (int i = 0; i < lines.Length; i++) {
GameObject.Destroy(c); if (lines[i] != null) {
foreach (GameObject c in lines[i]) Destroy(c);
}
}
}
lines = new GameObject[VisibleLines][]; lines = new GameObject[VisibleLines][];
refl = new int[VisibleLines]; refl = new int[VisibleLines];
for (int i = 0; i < refl.Length; i++) refl[i] = i; for (int i = 0; i < refl.Length; i++) refl[i] = i;
@@ -153,8 +157,9 @@ namespace Cryville.Common.Unity.UI {
private void ResetLines() { private void ResetLines() {
for (int i = 0; i < lines.Length; i++) { for (int i = 0; i < lines.Length; i++) {
if (lines[i] != null) foreach (GameObject c in lines[i]) if (lines[i] != null) {
GameObject.Destroy(c); foreach (GameObject c in lines[i]) Destroy(c);
}
lines[i] = new GameObject[LineItemCount]; lines[i] = new GameObject[LineItemCount];
GenerateLine(i, refl[i]); GenerateLine(i, refl[i]);
} }
@@ -200,7 +205,7 @@ namespace Cryville.Common.Unity.UI {
void GenerateLine(int index, int line) { void GenerateLine(int index, int line) {
for (int j = 0; j < LineItemCount; j++) { 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; lines[index][j] = child;
} }
LoadLine(index, line); 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.Common.Font;
using Cryville.Culture;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Reflection; using System.Reflection;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
@@ -22,19 +24,21 @@ namespace Cryville.Common.Unity.UI {
if (FontMatcher == null) return; if (FontMatcher == null) return;
_text = GetComponent<TextMeshProUGUI>(); _text = GetComponent<TextMeshProUGUI>();
if (_font == null) { if (_font == null) {
foreach (var typeface in FontMatcher.MatchScript(null, true)) { foreach (var typeface in FontMatcher.MatchLanguage(new LanguageId(CultureInfo.CurrentCulture.Name), true)) {
try { try {
var ifont = CreateFontAsset(typeface.File.FullName, typeface.IndexInFile); var ifont = CreateFontAsset(typeface.File.FullName, typeface.IndexInFile);
if (m_shader) ifont.material.shader = m_shader; if (m_shader) ifont.material.shader = m_shader;
else if (DefaultShader) ifont.material.shader = DefaultShader; else if (DefaultShader) ifont.material.shader = DefaultShader;
if (_font == null) { if (_font == null) {
_font = ifont; _font = ifont;
Shared.Logger.Log(1, "UI", "Using main font: {0}", typeface.FullName);
if (MaxFallbackCount <= 0) break; if (MaxFallbackCount <= 0) break;
} }
else { else {
if (_font.fallbackFontAssetTable == null) if (_font.fallbackFontAssetTable == null)
_font.fallbackFontAssetTable = new List<FontAsset>(); _font.fallbackFontAssetTable = new List<FontAsset>();
_font.fallbackFontAssetTable.Add(ifont); _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; if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
} }
} }

View File

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

View File

@@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cryville.Crtr.Browsing.Actions {
public class ActionManager {
readonly Dictionary<Type, List<IResourceAction>> _actions = new Dictionary<Type, List<IResourceAction>>();
public event Action Changed;
class ActionPriorityComparer : IComparer<IResourceAction> {
public static readonly ActionPriorityComparer Instance = new ActionPriorityComparer();
public int Compare(IResourceAction x, IResourceAction y) {
return x.Priority.CompareTo(y.Priority);
}
}
void Register(Type type, IResourceAction action) {
List<IResourceAction> actions;
if (!_actions.TryGetValue(type, out actions)) {
_actions.Add(type, actions = new List<IResourceAction>());
}
int index = actions.BinarySearch(action, ActionPriorityComparer.Instance);
if (index < 0) index = ~index;
actions.Insert(index, action);
Changed?.Invoke();
}
public void Register(IResourceAction action) {
Register(typeof(object), action);
}
public void Register<T>(IResourceAction<T> action) {
Register(typeof(T), action);
}
public void Unregister(Type type, IResourceAction action) {
List<IResourceAction> actions;
if (!_actions.TryGetValue(type, out actions)) return;
actions.Remove(action);
Changed?.Invoke();
}
public void Unregister(IResourceAction action) {
Unregister(typeof(object), action);
}
public void Unregister<T>(IResourceAction<T> action) {
Unregister(typeof(T), action);
}
public IEnumerable<IResourceAction> GetActions(Type type) {
List<IResourceAction> actions;
if (!_actions.TryGetValue(type, out actions)) {
actions = new List<IResourceAction>();
}
IEnumerable<IResourceAction> result = actions;
if (type != typeof(object)) result = result.Concat(GetActions(type.BaseType));
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,12 @@
using System;
namespace Cryville.Crtr.Browsing.Actions {
public interface IResourceAction {
string Name { get; }
int Priority { get; }
void Invoke(Uri uri, object resource);
}
public interface IResourceAction<T> : IResourceAction {
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,21 @@
using Cryville.Crtr.UI;
using System;
namespace Cryville.Crtr.Browsing.Actions {
internal class ImportResourceAction : IResourceAction {
readonly IResourceManager _destination;
public ImportResourceAction(IResourceManager destination) {
_destination = destination;
}
public string Name { get { return "Import"; } }
public int Priority { get { return 0; } }
public void Invoke(Uri uri, object 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,34 @@
using Cryville.Crtr.Browsing.UI;
using Cryville.Crtr.UI;
using System;
using System.Collections.Generic;
using Object = UnityEngine.Object;
namespace Cryville.Crtr.Browsing.Actions {
internal class OpenConfigAction : ResourceAction<ChartDetail> {
public override string Name { get { return "Config"; } }
public override int Priority { get { return -50; } }
static Dictionary<string, int> _rulesetTabs = new Dictionary<string, int>();
public override void Invoke(Uri uri, ChartDetail resource) {
var master = ResourceBrowserMaster.Instance;
var ruleset = resource.Meta.ruleset;
int tabId;
if (_rulesetTabs.TryGetValue(ruleset, out tabId) && master.TryOpenTab(tabId))
return;
var browser = Object.Instantiate(master.m_configBrowserPrefab).GetComponent<RulesetConfigBrowser>();
try {
browser.Load(ruleset);
}
catch (Exception ex) {
Dialog.Show(null, ex.Message);
Game.MainLogger.Log(4, "Config", "An error occurred while loading the config: {0}", ex);
Object.Destroy(browser.gameObject);
return;
}
_rulesetTabs[ruleset] = master.AddAndOpenTab(string.Format("Config: {0}", ruleset), browser);
}
}
}

View File

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

View File

@@ -0,0 +1,26 @@
using Cryville.Crtr.UI;
using System;
using System.IO;
using UnityEngine.SceneManagement;
namespace Cryville.Crtr.Browsing.Actions {
internal class PlayChartAction : ResourceAction<ChartDetail> {
public override string Name { get { return "Play"; } }
public override int Priority { get { return -100; } }
public override void Invoke(Uri uri, ChartDetail resource) {
Settings.Default.LoadRuleset = Path.Combine(resource.Meta.ruleset, ".umgr");
Settings.Default.LoadRulesetConfig = resource.Meta.ruleset + ".json";
Settings.Default.LoadChart = uri.LocalPath;
#if UNITY_5_3_OR_NEWER
SceneManager.LoadScene("Play", LoadSceneMode.Additive);
#else
Application.LoadLevelAdditive("Play");
#endif
Master.Instance.HideMenu();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
DiscordController.Instance.SetPlaying(string.Format("{0} - {1}", resource.Meta.song.name, resource.Meta.name), resource.Meta.length);
#endif
}
}
}

View File

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

View File

@@ -0,0 +1,14 @@
using System;
namespace Cryville.Crtr.Browsing.Actions {
public abstract class ResourceAction<T> : IResourceAction<T> {
public abstract string Name { get; }
public abstract int Priority { get; }
public abstract void Invoke(Uri uri, T resource);
public void Invoke(Uri uri, object resource) {
if (resource == null) throw new ArgumentNullException("resource");
if (!(resource is T)) throw new ArgumentException("Mismatched resource type.");
Invoke(uri, (T)resource);
}
}
}

View File

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

View File

@@ -1,10 +1,29 @@
using Cryville.Common; using Cryville.Common;
using Cryville.Crtr.Extension; using Cryville.Crtr.Extension;
using System;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace Cryville.Crtr.Browsing { namespace Cryville.Crtr.Browsing {
public struct ChartDetail { public class ChartDetail : IResourceMeta {
public AsyncDelivery<Texture2D> Cover { get; set; } public AsyncDelivery<Texture2D> Cover { get; set; }
public ChartMeta Meta { get; set; } public ChartMeta Meta { get; set; }
public IEnumerable<MetaProperty> Properties {
get {
if (Meta == null) yield break;
yield return new MetaProperty("Name", new Dictionary<string, object> {
{ "", string.Format("{0} - {1}", Meta.song.name, Meta.name) },
{ "short", Meta.name },
{ "distinct-primary", Meta.song.name },
{ "distinct-secondary", Meta.name },
});
yield return new MetaProperty("Image", Cover);
yield return new MetaProperty("Song.Author", Meta.song.author);
yield return new MetaProperty("Author", Meta.author);
yield return new MetaProperty("Length", TimeSpan.FromSeconds(Meta.length));
yield return new MetaProperty("NoteCount", Meta.note_count);
}
}
} }
} }

View File

@@ -1,4 +1,3 @@
using Cryville.Common.Logging;
using Cryville.Crtr.Extension; using Cryville.Crtr.Extension;
using Mono.Cecil; using Mono.Cecil;
using System; using System;
@@ -11,8 +10,8 @@ namespace Cryville.Crtr.Browsing {
internal static class ExtensionManager { internal static class ExtensionManager {
static readonly Dictionary<string, List<ResourceConverter>> _converters static readonly Dictionary<string, List<ResourceConverter>> _converters
= new Dictionary<string, List<ResourceConverter>>(); = new Dictionary<string, List<ResourceConverter>>();
public static IEnumerable<string> GetSupportedFormats() { public static ISet<string> GetSupportedFormats() {
return _converters.Keys; return new HashSet<string>(_converters.Keys);
} }
public static bool TryGetConverters(string extension, out IEnumerable<ResourceConverter> converters) { public static bool TryGetConverters(string extension, out IEnumerable<ResourceConverter> converters) {
List<ResourceConverter> outResult; List<ResourceConverter> outResult;
@@ -36,7 +35,7 @@ namespace Cryville.Crtr.Browsing {
modules.Enqueue(new ModuleItem(extension.OpenRead())); modules.Enqueue(new ModuleItem(extension.OpenRead()));
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Log("main", 4, "Extension", "Failed to load DLL {0}: {1}", extension, ex); Game.MainLogger.Log(4, "Extension", "Failed to load DLL {0}: {1}", extension, ex);
} }
} }
} }
@@ -68,10 +67,10 @@ namespace Cryville.Crtr.Browsing {
LoadExtension(type); LoadExtension(type);
} }
} }
Logger.Log("main", 1, "Extension", "Loaded module {0}", module.Definition.Name); Game.MainLogger.Log(1, "Extension", "Loaded module {0}", module.Definition.Name);
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Log("main", 4, "Extension", "An error occurred while trying to load module {0}: {1}", module.Definition.Name, ex); Game.MainLogger.Log(4, "Extension", "An error occurred while trying to load module {0}: {1}", module.Definition.Name, ex);
} }
finally { finally {
module.Definition.Dispose(); module.Definition.Dispose();
@@ -89,7 +88,7 @@ namespace Cryville.Crtr.Browsing {
missingList.Add(reference.Name); missingList.Add(reference.Name);
} }
} }
Logger.Log("main", 4, "Extension", "Could not load the module {0} because the following dependencies were missing: {1}", module.Definition.Name, missingList.Aggregate((current, next) => current + ", " + next)); Game.MainLogger.Log(4, "Extension", "Could not load the module {0} because the following dependencies were missing: {1}", module.Definition.Name, missingList.Aggregate((current, next) => current + ", " + next));
module.Definition.Dispose(); module.Definition.Dispose();
module.Stream.Dispose(); module.Stream.Dispose();
} }
@@ -128,10 +127,10 @@ namespace Cryville.Crtr.Browsing {
if (name != null && path != null) _localRes.Add(name, path); if (name != null && path != null) _localRes.Add(name, path);
} }
} }
Logger.Log("main", 1, "Extension", "Loaded extension {0}", type); Game.MainLogger.Log(1, "Extension", "Loaded extension {0}", type);
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Log("main", 4, "Extension", "Failed to load extension {0}: {1}", type, ex); Game.MainLogger.Log(4, "Extension", "Failed to load extension {0}: {1}", type, ex);
} }
} }
} }

View File

@@ -0,0 +1,148 @@
using Cryville.Common;
using Cryville.Crtr.UI;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security;
namespace Cryville.Crtr.Browsing {
internal class FileSystemResourceManager : IPathedResourceManager<FileSystemEntry> {
DirectoryInfo _cd;
FileSystemEntry[] _items = new FileSystemEntry[0];
FileSystemEntry[] _filteredItems = new FileSystemEntry[0];
string _filter = string.Empty;
public FileSystemEntry this[int index] { get { return _filteredItems[index]; } }
IResourceMeta IResourceManager.this[int index] { get { return this[index]; } }
readonly List<string> _dirParts = new List<string>();
readonly IList<string> m_dirParts;
public IList<string> CurrentDirectory { get { return m_dirParts; } }
public int Count { get { return _filteredItems.Length; } }
public bool IsReadOnly { get { return true; } }
public event Action DirectoryChanged;
public event Action ItemChanged;
readonly ISet<string> _extFilter = ExtensionManager.GetSupportedFormats();
public FileSystemResourceManager() {
m_dirParts = _dirParts.AsReadOnly();
OnDirectoryChange();
}
void OnDirectoryChange() {
if (_dirParts.Count == 0) {
IEnumerable<FileSystemEntry> items;
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
items = Directory.GetLogicalDrives().Select(d => new FileSystemEntry(new DirectoryInfo(d)));
#elif UNITY_ANDROID
items = new FileSystemEntry[] { new FileSystemEntry("Storage", new DirectoryInfo("/sdcard")) };
#else
#error No root path searching logic
#endif
items = items.Concat(
ExtensionManager.GetLocalResourcePaths()
.Select(p => new FileSystemEntry(p.Key, new DirectoryInfo(p.Value)))
);
_items = items.ToArray();
ItemChanged?.Invoke();
}
else {
var path = string.Join(Path.DirectorySeparatorChar, _dirParts);
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (_dirParts.Count == 1) path += Path.DirectorySeparatorChar;
#elif UNITY_ANDROID
path += Path.DirectorySeparatorChar;
#else
#error No root path handling logic
#endif
_cd = new DirectoryInfo(path);
try {
_items = _cd.GetFileSystemInfos()
.Where(i => i is DirectoryInfo || _extFilter.Contains(i.Extension))
.Select(i => new FileSystemEntry(i)).ToArray();
}
catch (DirectoryNotFoundException ex) {
Popup.CreateException(ex);
return;
}
catch (SecurityException ex) {
Popup.CreateException(ex);
return;
}
catch (UnauthorizedAccessException ex) {
Popup.CreateException(ex);
return;
}
}
ApplyFilter();
DirectoryChanged?.Invoke();
}
public void Activate() { }
public void Deactivate() { }
public Uri GetItemUri(int index) {
return new Uri(PlatformConfig.FileProtocolPrefix + _filteredItems[index].FileSystemInfo.FullName);
}
public void ChangeDirectory(IEnumerable<string> dir) {
_dirParts.Clear();
foreach (string dirPart in dir) _dirParts.Add(dirPart);
OnDirectoryChange();
}
public bool IsDirectory(int index) {
return _filteredItems[index].FileSystemInfo is DirectoryInfo;
}
public void OpenDirectory(int index) {
_dirParts.Clear();
foreach (string dirPart in _filteredItems[index].FileSystemInfo.FullName.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries)) _dirParts.Add(dirPart);
OnDirectoryChange();
}
public void ReturnToDirectory(int index) {
_dirParts.RemoveRange(index + 1, _dirParts.Count - index - 1);
OnDirectoryChange();
}
public void ApplyFilter(string filter) {
_filter = filter;
ApplyFilter();
}
void ApplyFilter() {
IEnumerable<FileSystemEntry> items = _items;
foreach (var keyword in _filter.Split(' ', StringSplitOptions.RemoveEmptyEntries)) {
items = items.Where(i => i.FileSystemInfo.Name.Contains(keyword, StringComparison.CurrentCultureIgnoreCase));
}
_filteredItems = items.ToArray();
ItemChanged?.Invoke();
}
public bool ImportFrom(Uri uri) { throw new NotSupportedException(); }
public void RemoveAt(int index) { throw new NotSupportedException(); }
}
internal class FileSystemEntry : IResourceMeta {
readonly string _name;
public FileSystemInfo FileSystemInfo { get; private set; }
public FileSystemEntry(FileSystemInfo fileSystemInfo) : this(fileSystemInfo.Name, fileSystemInfo) { }
public FileSystemEntry(string name, FileSystemInfo fileSystemInfo) {
_name = name;
FileSystemInfo = fileSystemInfo;
}
public IEnumerable<MetaProperty> Properties {
get {
yield return new MetaProperty("Name", _name);
if (FileSystemInfo is FileInfo) {
var file = (FileInfo)FileSystemInfo;
yield return new MetaProperty("Size", new Qualified<long>(file.Length, "B"));
}
yield return new MetaProperty("Write.Time", FileSystemInfo.LastWriteTime);
yield return new MetaProperty("Creation.Time", FileSystemInfo.CreationTime);
yield return new MetaProperty("Access.Time", FileSystemInfo.LastAccessTime);
}
}
}
}

View File

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

View File

@@ -1,17 +1,32 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Cryville.Crtr.Browsing { namespace Cryville.Crtr.Browsing {
public interface IResourceManager<T> { public interface IResourceManager {
string[] CurrentDirectory { get; } int Count { get; }
int ChangeDirectory(string[] dir);
int OpenDirectory(int id);
int ReturnToDirectory(int id);
ResourceItemMeta GetItemMeta(int id);
T GetItemDetail(int id);
string GetItemPath(int id);
bool ImportItemFrom(string path); IResourceMeta this[int index] { get; }
string[] GetSupportedFormats(); Uri GetItemUri(int index);
IReadOnlyDictionary<string, string> GetPresetPaths();
event Action ItemChanged;
bool IsReadOnly { get; }
bool ImportFrom(Uri uri);
void RemoveAt(int index);
void Activate();
void Deactivate();
void ApplyFilter(string filter);
}
public interface IResourceManager<out T> : IResourceManager where T : IResourceMeta {
new T this[int index] { get; }
}
public interface IPathedResourceManager<out T> : IResourceManager<T> where T : IResourceMeta {
event Action DirectoryChanged;
IList<string> CurrentDirectory { get; }
void ChangeDirectory(IEnumerable<string> dir);
bool IsDirectory(int index);
void OpenDirectory(int index);
void ReturnToDirectory(int index);
} }
} }

View File

@@ -0,0 +1,7 @@
using System.Collections.Generic;
namespace Cryville.Crtr.Browsing {
public interface IResourceMeta {
IEnumerable<MetaProperty> Properties { get; }
}
}

View File

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

View File

@@ -10,113 +10,139 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
using Logger = Cryville.Common.Logging.Logger;
namespace Cryville.Crtr.Browsing { namespace Cryville.Crtr.Browsing {
internal class LegacyResourceManager : IResourceManager<ChartDetail> { internal class LegacyResourceManager : IPathedResourceManager<ChartDetail> {
private readonly string _rootPath; readonly string _rootPath;
private DirectoryInfo cd; DirectoryInfo _cd;
private DirectoryInfo[] items = new DirectoryInfo[0]; readonly FileSystemWatcher _watcher = new FileSystemWatcher();
public string[] CurrentDirectory { get; private set; } DirectoryInfo[] _items = new DirectoryInfo[0];
DirectoryInfo[] _filteredItems = new DirectoryInfo[0];
string _filter = string.Empty;
readonly List<string> _dirParts = new List<string>();
readonly IList<string> m_dirParts;
public IList<string> CurrentDirectory { get { return m_dirParts; } }
public int Count { get { return _filteredItems.Length; } }
static bool _init; static bool _init;
public event Action ItemChanged;
public event Action DirectoryChanged;
public LegacyResourceManager(string rootPath) { public LegacyResourceManager(string rootPath) {
_rootPath = rootPath; _rootPath = rootPath;
if (!_init) { if (!_init) {
_init = true; _init = true;
ExtensionManager.Init(rootPath); ExtensionManager.Init(rootPath);
} }
m_dirParts = _dirParts.AsReadOnly();
_watcher.Changed += OnFileChanged;
_watcher.Created += OnFileChanged;
_watcher.Deleted += OnFileChanged;
_watcher.Renamed += OnFileChanged;
_watcher.Error += OnFileWatcherError;
OnDirectoryChange();
} }
public int ChangeDirectory(string[] dir) { void OnFileWatcherError(object sender, ErrorEventArgs e) {
CurrentDirectory = dir; Game.MainLogger.Log(4, "Data", "An error occurred while watching file changes: {0}", e.GetException());
cd = new DirectoryInfo(_rootPath + "/charts/" + string.Join("/", dir)); }
items = cd.GetDirectories(); void OnFileChanged(object sender, FileSystemEventArgs e) {
return items.Length; ReloadFiles();
} }
public int OpenDirectory(int id) { public void Activate() {
string[] nd = new string[CurrentDirectory.Length + 1]; _watcher.EnableRaisingEvents = !string.IsNullOrEmpty(_watcher.Path);
Array.Copy(CurrentDirectory, nd, CurrentDirectory.Length); }
nd[CurrentDirectory.Length] = items[id].Name; public void Deactivate() {
return ChangeDirectory(nd); _watcher.EnableRaisingEvents = false;
} }
public int ReturnToDirectory(int id) { void ReloadFiles() {
string[] nd = new string[id + 1]; _items = _cd.GetDirectories();
Array.Copy(CurrentDirectory, nd, id + 1); ApplyFilter();
return ChangeDirectory(nd); }
void OnDirectoryChange() {
string path = Path.Combine(_rootPath, "charts", string.Join(Path.DirectorySeparatorChar, _dirParts));
_cd = new DirectoryInfo(path);
_watcher.Path = path;
_watcher.EnableRaisingEvents = true;
ReloadFiles();
DirectoryChanged?.Invoke();
}
public void ChangeDirectory(IEnumerable<string> dir) {
_dirParts.Clear();
foreach (string dirPart in dir) _dirParts.Add(dirPart);
OnDirectoryChange();
}
public bool IsDirectory(int index) { return false; }
public void OpenDirectory(int index) {
_dirParts.Add(_filteredItems[index].Name);
OnDirectoryChange();
}
public void ReturnToDirectory(int index) {
_dirParts.RemoveRange(index + 1, _dirParts.Count - index - 1);
OnDirectoryChange();
} }
public ResourceItemMeta GetItemMeta(int id) { public void ApplyFilter(string filter) {
var item = items[id]; _filter = filter;
ApplyFilter();
}
void ApplyFilter() {
IEnumerable<DirectoryInfo> items = _items;
foreach (var keyword in _filter.Split(' ', StringSplitOptions.RemoveEmptyEntries)) {
items = items.Where(i => i.Name.Contains(keyword, StringComparison.CurrentCultureIgnoreCase));
}
_filteredItems = items.ToArray();
ItemChanged?.Invoke();
}
public ChartDetail this[int index] {
get {
var item = _filteredItems[index];
ChartMeta meta = null;
AsyncDelivery<Texture2D> cover = null;
var metaFile = new FileInfo(Path.Combine(item.FullName, ".umgc"));
if (metaFile.Exists) {
using (var reader = new StreamReader(metaFile.FullName)) {
meta = JsonConvert.DeserializeObject<ChartMeta>(reader.ReadToEnd());
}
if (meta.cover != null && meta.cover != "") {
var coverFile = item.GetFiles(meta.cover);
if (coverFile.Length > 0) {
cover = new AsyncDelivery<Texture2D>();
var task = new LoadTextureTask(PlatformConfig.FileProtocolPrefix + coverFile[0].FullName, cover.Deliver);
cover.CancelSource = task.Cancel;
Game.NetworkTaskWorker.SubmitNetworkTask(task);
}
}
}
return new ChartDetail {
Cover = cover,
Meta = meta,
};
}
}
IResourceMeta IResourceManager.this[int index] { get { return this[index]; } }
public Uri GetItemUri(int index) {
var item = _filteredItems[index];
var meta = new ChartMeta(); var meta = new ChartMeta();
string name = item.Name; var metaFile = new FileInfo(Path.Combine(item.FullName, ".umgc"));
string desc = "(Unknown)";
var metaFile = new FileInfo(item.FullName + "/.umgc");
if (metaFile.Exists) {
using (var reader = new StreamReader(metaFile.FullName)) {
meta = JsonConvert.DeserializeObject<ChartMeta>(reader.ReadToEnd());
name = meta.song.name;
desc = meta.name;
}
}
AsyncDelivery<Texture2D> cover = null;
if (meta.cover != null && meta.cover != "") {
var coverFile = item.GetFiles(meta.cover);
if (coverFile.Length > 0) {
cover = new AsyncDelivery<Texture2D>();
var task = new LoadTextureTask(PlatformConfig.FileProtocolPrefix + coverFile[0].FullName, cover.Deliver);
cover.CancelSource = task.Cancel;
Game.NetworkTaskWorker.SubmitNetworkTask(task);
}
}
return new ResourceItemMeta {
IsDirectory = false,
Icon = cover,
Name = name,
DescriptionMain = desc,
};
}
public ChartDetail GetItemDetail(int id) {
var item = items[id];
var meta = new ChartMeta();
var metaFile = new FileInfo(item.FullName + "/.umgc");
if (metaFile.Exists) {
using (var reader = new StreamReader(metaFile.FullName)) {
meta = JsonConvert.DeserializeObject<ChartMeta>(reader.ReadToEnd());
}
}
AsyncDelivery<Texture2D> cover = null;
if (meta.cover != null && meta.cover != "") {
var coverFile = item.GetFiles(meta.cover);
if (coverFile.Length > 0) {
cover = new AsyncDelivery<Texture2D>();
var task = new LoadTextureTask(PlatformConfig.FileProtocolPrefix + coverFile[0].FullName, cover.Deliver);
cover.CancelSource = task.Cancel;
Game.NetworkTaskWorker.SubmitNetworkTask(task);
}
}
return new ChartDetail {
Cover = cover,
Meta = meta,
};
}
public string GetItemPath(int id) {
var item = items[id];
var meta = new ChartMeta();
var metaFile = new FileInfo(item.FullName + "/.umgc");
using (var reader = new StreamReader(metaFile.FullName)) { using (var reader = new StreamReader(metaFile.FullName)) {
meta = JsonConvert.DeserializeObject<ChartMeta>(reader.ReadToEnd()); meta = JsonConvert.DeserializeObject<ChartMeta>(reader.ReadToEnd());
} }
return string.Format("{0}/{1}.json", items[id].Name, meta.data); return new Uri(PlatformConfig.FileProtocolPrefix + Path.Combine(_filteredItems[index].FullName, string.Format("{0}.json", meta.data)));
} }
public bool ImportItemFrom(string path) { public bool IsReadOnly { get { return false; } }
var file = new FileInfo(path); public void RemoveAt(int index) {
_filteredItems[index].Delete(true);
}
public bool ImportFrom(Uri uri) {
if (!uri.IsFile) throw new NotSupportedException();
var file = new FileInfo(uri.LocalPath);
IEnumerable<ResourceConverter> converters; IEnumerable<ResourceConverter> converters;
if (!ExtensionManager.TryGetConverters(file.Extension, out converters)) return false; if (!ExtensionManager.TryGetConverters(file.Extension, out converters)) return false;
foreach (var converter in converters) { foreach (var converter in converters) {
@@ -137,12 +163,12 @@ namespace Cryville.Crtr.Browsing {
} }
else if (res is RawChartResource) { else if (res is RawChartResource) {
var tres = (RawChartResource)res; var tres = (RawChartResource)res;
var dir = new DirectoryInfo(_rootPath + "/charts/" + res.Name); var dir = new DirectoryInfo(Path.Combine(_rootPath, "charts", res.Name));
if (!dir.Exists) dir.Create(); if (!dir.Exists) dir.Create();
using (var writer = new StreamWriter(dir.FullName + "/.json")) { using (var writer = new StreamWriter(Path.Combine(dir.FullName, ".json"))) {
writer.Write(JsonConvert.SerializeObject(ConvertChartData(tres.Main), Game.GlobalJsonSerializerSettings)); writer.Write(JsonConvert.SerializeObject(ConvertChartData(tres.Main), Game.GlobalJsonSerializerSettings));
} }
using (var writer = new StreamWriter(dir.FullName + "/.umgc")) { using (var writer = new StreamWriter(Path.Combine(dir.FullName, ".umgc"))) {
tres.Meta.data = ""; tres.Meta.data = "";
writer.Write(JsonConvert.SerializeObject(tres.Meta, Game.GlobalJsonSerializerSettings)); writer.Write(JsonConvert.SerializeObject(tres.Meta, Game.GlobalJsonSerializerSettings));
} }
@@ -157,18 +183,18 @@ namespace Cryville.Crtr.Browsing {
DirectoryInfo dest; DirectoryInfo dest;
bool singleFileFlag = false; bool singleFileFlag = false;
if (res is ChartResource) if (res is ChartResource)
dest = new DirectoryInfo(_rootPath + "/charts/" + res.Name); dest = new DirectoryInfo(Path.Combine(_rootPath, "charts", res.Name));
else if (res is ExtensionResource) { else if (res is ExtensionResource) {
dest = new DirectoryInfo(_rootPath + "/extensions"); dest = new DirectoryInfo(Path.Combine(_rootPath, "extensions"));
singleFileFlag = true; singleFileFlag = true;
Popup.Create("Please restart the game to reload the extensions"); Popup.Create("Please restart the game to reload the extensions");
} }
else if (res is RulesetResource) else if (res is RulesetResource)
dest = new DirectoryInfo(_rootPath + "/rulesets/" + res.Name); dest = new DirectoryInfo(Path.Combine(_rootPath, "rulesets", res.Name));
else if (res is SkinResource) else if (res is SkinResource)
dest = new DirectoryInfo(_rootPath + "/skins/" + (res as SkinResource).RulesetName + "/" + res.Name); dest = new DirectoryInfo(Path.Combine(_rootPath, "skins", (res as SkinResource).RulesetName, res.Name));
else if (res is SongResource) else if (res is SongResource)
dest = new DirectoryInfo(_rootPath + "/songs/" + res.Name); dest = new DirectoryInfo(Path.Combine(_rootPath, "songs", res.Name));
else { else {
LogAndPopup(3, "Attempt to import unsupported file resource: {0}", res); LogAndPopup(3, "Attempt to import unsupported file resource: {0}", res);
continue; continue;
@@ -181,12 +207,13 @@ namespace Cryville.Crtr.Browsing {
attachment.CopyTo(Path.Combine(dest.FullName, attachment.Name)); attachment.CopyTo(Path.Combine(dest.FullName, attachment.Name));
} }
} }
else LogAndPopup(1, "Resource already exists: {0}", res); else Game.MainLogger.Log(1, "Resource", "Resource already exists: {0}", res);
} }
else { else {
LogAndPopup(3, "Attempt to import unsupported resource: {0}", res); LogAndPopup(3, "Attempt to import unsupported resource: {0}", res);
} }
} }
ReloadFiles();
return true; return true;
} }
return false; return false;
@@ -194,24 +221,16 @@ namespace Cryville.Crtr.Browsing {
void LogAndPopup(int level, string format, params object[] args) { void LogAndPopup(int level, string format, params object[] args) {
var msg = string.Format(format, args); var msg = string.Format(format, args);
Logger.Log("main", level, "Resource", msg); Game.MainLogger.Log(level, "Resource", msg);
Popup.Create(msg); Popup.Create(msg);
} }
void LogAndPopupExtra(int level, object extraLog, string format, params object[] args) { void LogAndPopupExtra(int level, object extraLog, string format, params object[] args) {
var msg = string.Format(format, args); var msg = string.Format(format, args);
Logger.Log("main", level, "Resource", "{0}\n{1}", msg, extraLog); Game.MainLogger.Log(level, "Resource", "{0}\n{1}", msg, extraLog);
Popup.Create(msg); Popup.Create(msg);
} }
public string[] GetSupportedFormats() {
return ExtensionManager.GetSupportedFormats().ToArray();
}
public IReadOnlyDictionary<string, string> GetPresetPaths() {
return ExtensionManager.GetLocalResourcePaths();
}
static Chart ConvertChartData(ChartData i) { static Chart ConvertChartData(ChartData i) {
return new Chart { return new Chart {
endtime = ConvertBeatTime(i.endtime), endtime = ConvertBeatTime(i.endtime),

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
namespace Cryville.Crtr.Browsing {
public class MetaProperty {
public string Name { get; set; }
public IReadOnlyDictionary<string, object> Values { get; set; }
public object MainValue { get { return Values[""]; } }
public MetaProperty(string name, IReadOnlyDictionary<string, object> values) {
if (values.Count == 0) throw new ArgumentException("Value is empty.");
if (!values.ContainsKey("")) throw new ArgumentException("Main value is missing.");
Name = name;
Values = values;
}
public MetaProperty(string name, object value) {
Name = name;
Values = new Dictionary<string, object> { { "", value } };
}
}
}

View File

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

View File

@@ -1,12 +0,0 @@
using Cryville.Common;
using UnityEngine;
namespace Cryville.Crtr.Browsing {
public struct ResourceItemMeta {
public bool IsDirectory { get; set; }
public AsyncDelivery<Texture2D> Icon { get; set; }
public string Name { get; set; }
public string DescriptionMain { get; set; }
public string DescriptionSub { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using Cryville.Crtr.Browsing.Actions;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Cryville.Crtr.Browsing.UI {
internal class ActionBar : MonoBehaviour {
[SerializeField]
ActionButton m_mainButton;
[SerializeField]
ActionButton m_subButton;
public void Load(ResourceBrowser browser, IEnumerable<IResourceAction> actions) {
var enumerator = actions.OrderBy(i => i.Priority).GetEnumerator();
if (enumerator.MoveNext()) {
gameObject.SetActive(true);
m_mainButton.Load(browser, enumerator.Current);
if (enumerator.MoveNext()) {
m_subButton.Load(browser, enumerator.Current);
}
else {
m_subButton.Clear();
}
}
else {
m_mainButton.Clear();
Clear();
}
}
public void Clear() {
gameObject.SetActive(false);
}
}
}

View File

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

View File

@@ -0,0 +1,29 @@
using Cryville.Crtr.Browsing.Actions;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
namespace Cryville.Crtr.Browsing.UI {
internal class ActionButton : MonoBehaviour, IPointerClickHandler {
[SerializeField]
TextMeshProUGUI m_text;
ResourceBrowser _browser;
IResourceAction _action;
public void Load(ResourceBrowser browser, IResourceAction action) {
gameObject.SetActive(true);
_browser = browser;
_action = action;
m_text.text = action.Name;
}
public void Clear() {
gameObject.SetActive(false);
}
public void OnPointerClick(PointerEventData eventData) {
if (_action == null) return;
_browser.InvokeAction(_action);
}
}
}

View File

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

View File

@@ -2,11 +2,21 @@ using UnityEngine;
namespace Cryville.Crtr.Browsing.UI { namespace Cryville.Crtr.Browsing.UI {
internal abstract class BrowserItem : MonoBehaviour { internal abstract class BrowserItem : MonoBehaviour {
public int? Id { get; private set; } protected ResourceBrowser Browser { get; private set; }
protected ResourceItemMeta meta; protected int? Id { get; private set; }
internal virtual void Load(int id, ResourceItemMeta item) { protected bool IsDir { get; private set; }
protected IResourceMeta Meta { get; private set; }
internal void Load(ResourceBrowser browser, int id, bool isDir, IResourceMeta item, bool selected) {
OnReset();
Browser = browser;
Id = id; Id = id;
meta = item; IsDir = isDir;
Meta = item;
OnLoad(selected);
} }
protected abstract void OnReset();
protected abstract void OnLoad(bool selected);
internal virtual void OnSelect() { }
internal virtual void OnDeselect() { }
} }
} }

View File

@@ -1,53 +1,90 @@
using Cryville.Common;
using Cryville.Common.Unity;
using System.Linq;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI { namespace Cryville.Crtr.Browsing.UI {
internal class BrowserItemTile : BrowserItem { internal class BrowserItemTile : BrowserItem, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler {
#pragma warning disable IDE0044 #pragma warning disable IDE0044
[SerializeField] [SerializeField]
private Sprite m_iconPlaceholder; Sprite m_iconPlaceholder;
#pragma warning restore IDE0044 #pragma warning restore IDE0044
private bool _dir; [SerializeField]
private Image _icon; Image m_icon;
private TMP_Text _title; [SerializeField]
private TMP_Text _desc; TMP_Text m_title;
[SerializeField]
TMP_Text m_desc;
StateTweener _tweener;
AsyncDelivery<Texture2D> _cover;
#pragma warning disable IDE0051
void Awake() { void Awake() {
_icon = transform.Find("__content__/Icon").GetComponent<Image>(); _tweener = GetComponent<StateTweener>();
_title = transform.Find("__content__/Texts/Title/__text__").GetComponent<TMP_Text>();
_desc = transform.Find("__content__/Texts/Description/__text__").GetComponent<TMP_Text>();
} }
void OnDestroy() {
if (meta.Icon != null) meta.Icon.Cancel();
if (_icon.sprite != null && _icon.sprite != m_iconPlaceholder) {
Texture2D.Destroy(_icon.sprite.texture);
Sprite.Destroy(_icon.sprite);
}
}
#pragma warning restore IDE0051
internal override void Load(int id, ResourceItemMeta item) { void OnDestroy() {
OnDestroy(); OnReset();
base.Load(id, item);
_dir = meta.IsDirectory;
_icon.sprite = m_iconPlaceholder;
if (meta.Icon != null) meta.Icon.Destination = DisplayCover;
_title.text = meta.Name;
_desc.text = string.Format("{0}\n{1}", meta.DescriptionMain, meta.DescriptionSub);
} }
private void DisplayCover(bool succeeded, Texture2D tex) { protected override void OnReset() {
if (_cover != null) _cover.Cancel();
if (m_icon.sprite != null && m_icon.sprite != m_iconPlaceholder) {
Destroy(m_icon.sprite.texture);
Destroy(m_icon.sprite);
}
_tweener.ClearState();
}
protected override void OnLoad(bool selected) {
m_icon.sprite = m_iconPlaceholder;
m_desc.text = string.Empty;
var basicProps = Meta.EnumerateBasicProperties(true).GetEnumerator();
if (basicProps.MoveNext()) {
m_title.text = basicProps.Current.Value.ToString();
if (basicProps.MoveNext()) {
m_desc.text = basicProps.Current.Value.ToString();
}
}
else {
m_title.text = "<color=#ff0000>Invalid resource</color>";
}
_cover = Meta.EnumerateProperties<AsyncDelivery<Texture2D>>().FirstOrDefault().Value;
if (_cover != null) _cover.Destination = DisplayCover;
if (IsDir) _tweener.EnterState("Directory");
if (selected) _tweener.EnterState("Selected");
}
void DisplayCover(bool succeeded, Texture2D tex) {
if (succeeded) { if (succeeded) {
_icon.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.zero, 160, 0, SpriteMeshType.FullRect); m_icon.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.zero, 160, 0, SpriteMeshType.FullRect);
} }
} }
public void OnClick() { public void OnClick() {
if (Id == null) return; if (Id == null) return;
var resourceBrowser = GetComponentInParent<ResourceBrowser>(); Browser.OnItemClicked(Id.Value);
if (_dir) resourceBrowser.OnDirectoryItemClicked(Id.Value); }
else resourceBrowser.OnObjectItemClicked(Id.Value); public void OnPointerClick(PointerEventData eventData) {
OnClick();
}
public void OnPointerEnter(PointerEventData eventData) {
_tweener.EnterState("Hovered", 0.1f);
}
public void OnPointerExit(PointerEventData eventData) {
_tweener.ExitState("Hovered", 0.1f);
}
internal override void OnSelect() {
base.OnSelect();
_tweener.EnterState("Selected", 0.1f);
}
internal override void OnDeselect() {
base.OnDeselect();
_tweener.ExitState("Selected", 0.1f);
} }
} }
} }

View File

@@ -0,0 +1,66 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI {
[RequireComponent(typeof(BrowserTabLayout))]
[RequireComponent(typeof(CanvasGroup))]
internal class BrowserTab : MonoBehaviour, IPointerClickHandler {
[SerializeField]
Image m_icon;
[SerializeField]
TextMeshProUGUI m_text;
[SerializeField]
Button m_closeButton;
[SerializeField]
float m_deselectedAlpha = 0.6f;
public event Action<BrowserTab> Clicked;
public event Action<BrowserTab> Closed;
public Sprite Icon {
get { return m_icon.sprite; }
set { m_icon.sprite = value; }
}
public string Text {
get { return m_text.text; }
set { m_text.text = value; }
}
public bool Closable {
get { return m_closeButton.gameObject.activeSelf; }
set { m_closeButton.gameObject.SetActive(value); }
}
bool m_selected;
public bool Selected {
get { return m_selected; }
set {
if (m_selected == value) return;
m_selected = value;
UpdateSelected();
}
}
void UpdateSelected() {
_group.alpha = Selected ? 1 : m_deselectedAlpha;
_layout.Selected = Selected;
}
CanvasGroup _group;
BrowserTabLayout _layout;
void Awake() {
_group = GetComponent<CanvasGroup>();
_layout = GetComponent<BrowserTabLayout>();
m_closeButton.onClick.AddListener(OnCloseClicked);
UpdateSelected();
}
public void OnPointerClick(PointerEventData eventData) {
Clicked?.Invoke(this);
}
public void OnCloseClicked() {
Closed?.Invoke(this);
}
}
}

View File

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

View File

@@ -0,0 +1,117 @@
using Cryville.Common;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI {
[ExecuteAlways]
internal class BrowserTabLayout : UIBehaviour, ILayoutElement {
[SerializeField]
float m_minWidth = 150;
public float MinWidth {
get { return m_minWidth; }
set {
if (m_minWidth == value) return;
m_minWidth = value;
UpdateTweener();
}
}
float GetTargetLayoutMinWidth() {
var width = MinWidth;
if (Selected) {
var preferredWidth = LayoutUtility.GetPreferredWidth(transform as RectTransform);
if (preferredWidth > width) width = preferredWidth;
}
return width;
}
float m_layoutMinWidth = -1;
float ILayoutElement.minWidth { get { return m_layoutMinWidth; } }
void UpdateLayoutMinWidth(float value) {
if (m_layoutMinWidth == value) return;
m_layoutMinWidth = value;
SetDirty();
}
public float preferredWidth { get { return -1; } }
public float flexibleWidth { get { return -1; } }
public float minHeight { get { return -1; } }
public float preferredHeight { get { return -1; } }
public float flexibleHeight { get { return -1; } }
public int layoutPriority { get { return 1; } }
bool m_selected;
public bool Selected {
get { return m_selected; }
set {
if (m_selected == value) return;
m_selected = value;
UpdateTweener();
}
}
[SerializeField]
float m_tweenDuration = 0.2f;
float _lastWidth;
bool _delayedUpdate;
PropertyTweener<float> _tweener;
void UpdateTweener() {
var width = GetTargetLayoutMinWidth();
_tweener.Start(width, m_tweenDuration);
if (width != _lastWidth) {
_lastWidth = width;
_delayedUpdate = true;
}
}
void Update() {
if (_delayedUpdate) {
_delayedUpdate = false;
UpdateTweener();
}
_tweener.Advance(Time.deltaTime);
}
public void CalculateLayoutInputHorizontal() { }
public void CalculateLayoutInputVertical() { }
protected override void OnEnable() {
base.OnEnable();
m_layoutMinWidth = GetTargetLayoutMinWidth();
if (_tweener == null)
_tweener = new PropertyTweener<float>(
() => m_layoutMinWidth,
v => UpdateLayoutMinWidth(v),
Tweeners.Float.With(EasingFunctions.OutQuad)
);
SetDirty();
}
protected override void OnBeforeTransformParentChanged() {
base.OnBeforeTransformParentChanged();
SetDirty();
}
protected override void OnTransformParentChanged() {
base.OnTransformParentChanged();
SetDirty();
}
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();
}
void SetDirty() {
if (!IsActive()) return;
LayoutRebuilder.MarkLayoutForRebuild(transform as RectTransform);
}
}
}

View File

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

View File

@@ -1,67 +1,82 @@
using Cryville.Common; using Cryville.Common;
using System; using System.Linq;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI { namespace Cryville.Crtr.Browsing.UI {
public class DetailPanel : ResourceBrowserUnit { public class DetailPanel : MonoBehaviour {
#pragma warning disable IDE0044
[SerializeField] [SerializeField]
private Sprite m_coverPlaceholder; Sprite m_coverPlaceholder;
#pragma warning restore IDE0044 [SerializeField]
GameObject m_placeholder;
[SerializeField]
GameObject m_content;
[SerializeField]
Image m_cover;
[SerializeField]
TMP_Text m_title;
[SerializeField]
TMP_Text m_desc;
int _id; AsyncDelivery<Texture2D> _image;
ChartDetail _data;
GameObject _placeholder;
GameObject _outerContent;
Transform _content;
Image _cover;
TMP_Text _title;
TMP_Text _desc;
protected override void Awake() {
base.Awake();
_placeholder = transform.Find("__placeholder__").gameObject;
_outerContent = transform.Find("__content__").gameObject;
_content = _outerContent.transform.Find("__content__");
_cover = _content.Find("Cover").GetComponent<Image>();
_title = _content.Find("Texts/Title").GetComponent<TMP_Text>();
_desc = _content.Find("Texts/Description").GetComponent<TMP_Text>();
}
void OnDestroy() { void OnDestroy() {
if (_data.Cover != null) _data.Cover.Cancel(); DestroyDynamicResources();
if (_cover.sprite != null && _cover.sprite != m_coverPlaceholder) { }
Texture2D.Destroy(_cover.sprite.texture);
Sprite.Destroy(_cover.sprite); public void Load(IResourceMeta meta) {
m_placeholder.SetActive(false);
m_content.SetActive(true);
DestroyDynamicResources();
m_cover.sprite = m_coverPlaceholder;
_image = meta.EnumerateProperties<AsyncDelivery<Texture2D>>().FirstOrDefault().Value;
if (_image != null) _image.Destination = DisplayCover;
var nameProp = meta.Properties.FirstOrDefault(prop => prop.Name == "Name");
if (nameProp != null) {
var names = nameProp.EnumerateProperty(true).GetEnumerator();
if (names.MoveNext()) {
m_title.text = names.Current.Value.ToString();
if (names.MoveNext()) {
m_title.text += "\n" + names.Current.Value.ToString();
}
}
else {
m_title.text = "";
}
m_desc.text = "";
var basicProps = meta.EnumerateBasicProperties().Where(prop => prop.Key != "Name").GetEnumerator();
for (int i = 0; i < 4 && basicProps.MoveNext(); i++) {
var cur = basicProps.Current;
var str = string.Format("{0}: {1}", cur.Key, cur.Value);
if (i == 0) m_desc.text = str;
else m_desc.text += "\n" + str;
}
}
else {
m_title.text = "<color=#ff0000>Invalid resource</color>";
m_desc.text = "";
} }
} }
public void Load(int id, ChartDetail data) { void DisplayCover(bool succeeded, Texture2D tex) {
_id = id; if (!succeeded) return;
_placeholder.SetActive(false); m_cover.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.zero, 160, 0, SpriteMeshType.FullRect);
_outerContent.SetActive(true);
OnDestroy();
_data = data;
_cover.sprite = m_coverPlaceholder;
if (data.Cover != null) data.Cover.Destination = DisplayCover;
var meta = data.Meta;
_title.text = string.Format("{0}\n{1}", meta.song.name, meta.name);
_desc.text = string.Format(
"Music artist: {0}\nCharter: {1}\nLength: {2}\nNote Count: {3}",
meta.song.author, meta.author,
TimeSpan.FromSeconds(meta.length).ToString(3), meta.note_count
);
} }
private void DisplayCover(bool succeeded, Texture2D tex) { public void Clear() {
if (succeeded) { m_placeholder.SetActive(true);
_cover.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.zero, 160, 0, SpriteMeshType.FullRect); m_content.SetActive(false);
DestroyDynamicResources();
}
void DestroyDynamicResources() {
if (_image != null) _image.Cancel();
if (m_cover.sprite != null && m_cover.sprite != m_coverPlaceholder) {
Destroy(m_cover.sprite.texture);
Destroy(m_cover.sprite);
} }
} }
public void OnPlay() {
Master.Open(_id, _data);
}
public void OnConfig() {
Master.OpenConfig(_id, _data);
}
} }
} }

View File

@@ -0,0 +1,37 @@
using System.Collections.Generic;
using System;
using System.Linq;
namespace Cryville.Crtr.Browsing.UI {
internal static class MetaPropertyExtensions {
public static IEnumerable<KeyValuePair<string, object>> EnumerateProperty(this MetaProperty prop, bool shortDistinct = false) {
if (prop.Values.ContainsKey("distinct-primary") && shortDistinct) {
yield return new KeyValuePair<string, object>(prop.Name, prop.Values["distinct-primary"]);
if (prop.Values.ContainsKey("distinct-secondary")) {
yield return new KeyValuePair<string, object>(prop.Name, prop.Values["distinct-secondary"]);
if (prop.Values.ContainsKey("distinct-tertiary")) {
yield return new KeyValuePair<string, object>(prop.Name, prop.Values["distinct-tertiary"]);
}
}
}
else yield return new KeyValuePair<string, object>(prop.Name, prop.MainValue);
}
public static IEnumerable<KeyValuePair<string, object>> EnumerateProperties(this IResourceMeta meta, bool shortDistinct = false) {
foreach (var prop in meta.Properties) {
foreach (var item in EnumerateProperty(prop, shortDistinct)) yield return item;
}
}
public static IEnumerable<KeyValuePair<string, object>> EnumerateBasicProperties(this IResourceMeta meta, bool shortDistinct = false) {
foreach (var prop in EnumerateProperties(meta, shortDistinct)) {
if (prop.Value is string || prop.Value is IFormattable) {
yield return new KeyValuePair<string, object>(prop.Key, prop.Value);
}
}
}
public static IEnumerable<KeyValuePair<string, T>> EnumerateProperties<T>(this IResourceMeta meta, bool shortDistinct = false) {
return EnumerateProperties(meta, shortDistinct)
.Where(prop => prop.Value is T)
.Select(prop => new KeyValuePair<string, T>(prop.Key, (T)prop.Value));
}
}
}

View File

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

View File

@@ -21,7 +21,7 @@ namespace Cryville.Crtr.Browsing.UI {
else return exp; else return exp;
} }
public void OnClick() { public void OnClick() {
GetComponentInParent<ResourceBrowser>().OnPathClicked(_id); GetComponentInParent<PathedResourceBrowser>().OnPathClicked(_id);
} }
} }
} }

View File

@@ -0,0 +1,176 @@
using Cryville.Common.Unity.UI;
using Cryville.Crtr.Browsing.Actions;
using Cryville.Crtr.UI;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI {
internal class PathedResourceBrowser : ResourceBrowser {
[SerializeField]
Button[] m_writeTools;
[SerializeField]
TextMeshProUGUI m_pathText;
[SerializeField]
ScrollableItemGrid m_itemContainer;
[SerializeField]
DetailPanel m_detailPanel;
[SerializeField]
ActionBar m_actionBar;
[SerializeField]
Sprite m_readonlyIcon;
public override Sprite Icon {
get {
return _manager.IsReadOnly ? m_readonlyIcon : base.Icon;
}
}
IPathedResourceManager<IResourceMeta> _manager;
IResourceAction _importAction;
readonly IResourceAction[] _importActionArray = new IResourceAction[1];
readonly HashSet<int> _selectedItems = new HashSet<int>();
readonly Dictionary<int, BrowserItem> _items = new Dictionary<int, BrowserItem>();
protected virtual void Start() {
m_itemContainer.LoadItem = LoadItem;
}
void OnDestroy() {
UnregisterManager();
}
void UnregisterManager() {
if (_importAction != null) Master.Actions.Unregister(_importAction);
_manager.ItemChanged -= OnItemChanged;
_manager.DirectoryChanged -= OnDirectoryChanged;
}
void OnEnable() {
if (_manager != null) _manager.Activate();
}
void OnDisable() {
if (_manager != null) _manager.Deactivate();
}
public void Init(IPathedResourceManager<IResourceMeta> manager) {
if (_manager != null) {
OnDisable();
UnregisterManager();
}
_manager = manager;
_manager.ItemChanged += OnItemChanged;
_manager.DirectoryChanged += OnDirectoryChanged;
if (!_manager.IsReadOnly) {
Master.Actions.Register(_importAction = new ImportResourceAction(_manager));
_importActionArray[0] = _importAction;
}
foreach (var tool in m_writeTools) tool.interactable = !_manager.IsReadOnly;
OnEnable();
OnItemChanged();
OnDirectoryChanged();
}
bool _itemChanged;
void OnItemChanged() {
_itemChanged = true;
}
void OnDirectoryChanged() {
if (_manager.CurrentDirectory.Count == 0) m_pathText.text = "(Home)";
else m_pathText.text = string.Join(Path.DirectorySeparatorChar, _manager.CurrentDirectory);
}
void Update() {
if (_itemChanged) {
_itemChanged = false;
_selectedItems.Clear();
_items.Clear();
m_itemContainer.ItemCount = _manager.Count;
m_detailPanel.Clear();
m_actionBar.Clear();
}
}
private bool LoadItem(int id, GameObject obj) {
var bi = obj.GetComponent<BrowserItem>();
_items[id] = bi;
try {
var item = _manager[id];
bi.Load(this, id, _manager.IsDirectory(id), item, _selectedItems.Contains(id));
}
catch (Exception) {
bi.Load(this, id, _manager.IsDirectory(id), null, _selectedItems.Contains(id));
}
return true;
}
public override void OnItemClicked(int id) {
if (_manager.IsDirectory(id)) {
_manager.OpenDirectory(id);
}
else {
foreach (var item in _selectedItems) _items[item].OnDeselect();
_selectedItems.Clear();
_items[id].OnSelect();
_selectedItems.Add(id);
var res = _manager[id];
m_detailPanel.Load(res);
if (_selectedItems.Count == 1) {
LoadActions(res);
}
}
}
internal override void OnActionsChanged() {
if (_selectedItems.Count == 1) {
LoadActions(_manager[_selectedItems.Single()]);
}
}
void LoadActions(IResourceMeta res) {
m_actionBar.Load(this, Master.Actions.GetActions(res.GetType()).Except(_importActionArray));
}
public void OnPathClicked(int index) {
_manager.ReturnToDirectory(index);
}
public void OnHomeClicked() {
_manager.ChangeDirectory(Enumerable.Empty<string>());
}
public void OnParentClicked() {
var depth = _manager.CurrentDirectory.Count;
if (depth <= 0) return;
_manager.ReturnToDirectory(_manager.CurrentDirectory.Count - 2);
}
public void OnSearch(string value) {
_manager.ApplyFilter(value);
}
public void OnDeleteClicked() {
if (_selectedItems.Count == 0) {
Popup.Create("No item is selected.");
return;
}
Dialog.Show(DeleteSelectedItems, "Are you sure to delete the selected item(s)?", "Yes", "No");
}
void DeleteSelectedItems(int result) {
if (result != 0) return;
foreach (var item in _selectedItems.OrderByDescending(i => i)) _manager.RemoveAt(item);
}
public override void InvokeAction(IResourceAction action) {
if (_selectedItems.Count == 0) {
Popup.Create("No item is selected.");
return;
}
if (_selectedItems.Count > 1) {
Popup.Create("Cannot run this action with multiple items.");
return;
}
foreach (var i in _selectedItems) {
action.Invoke(_manager.GetItemUri(i), _manager[i]);
}
}
}
}

View File

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

View File

@@ -1,78 +1,20 @@
using Cryville.Common.Unity; using Cryville.Crtr.Browsing.Actions;
using Cryville.Common.Unity.UI;
using Cryville.Crtr.UI;
using System;
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI { namespace Cryville.Crtr.Browsing.UI {
public class ResourceBrowser : ResourceBrowserUnit { public abstract class ResourceBrowser : MonoBehaviour {
public IResourceManager<ChartDetail> ResourceManager; [SerializeField]
public ScrollableItemGrid PathContainer; Sprite m_icon;
public ScrollableItemGrid ItemContainer; public virtual Sprite Icon { get { return m_icon; } }
FileDialog _dialog; protected ResourceBrowserMaster Master { get; private set; }
internal void Init(ResourceBrowserMaster master) {
protected void Start() { Master = master;
PathContainer.LoadItem = LoadPathPart;
ItemContainer.LoadItem = LoadItem;
ItemContainer.ItemCount = ResourceManager.ChangeDirectory(new string[] { "" });
PathContainer.ItemCount = ResourceManager.CurrentDirectory.Length;
_dialog = GameObject.Instantiate(Resources.Load<GameObject>("Common/FileDialog")).GetComponent<FileDialog>();
_dialog.gameObject.SetActive(false);
_dialog.Filter = ResourceManager.GetSupportedFormats();
_dialog.PresetPaths = ResourceManager.GetPresetPaths();
_dialog.OnClose += OnAddDialogClosed;
} }
private bool LoadPathPart(int id, GameObject obj) { public abstract void OnItemClicked(int index);
var item = ResourceManager.CurrentDirectory[id];
obj.GetComponent<PathPart>().Load(id, item);
return true;
}
private bool LoadItem(int id, GameObject obj) { public abstract void InvokeAction(IResourceAction action);
var bi = obj.GetComponent<BrowserItem>(); internal abstract void OnActionsChanged();
try {
var item = ResourceManager.GetItemMeta(id);
bi.Load(id, item);
}
catch (Exception) {
bi.Load(id, new ResourceItemMeta { Name = "<color=#ff0000>Invalid resource</color>" });
}
return true;
}
public void OnDirectoryItemClicked(int id) {
ItemContainer.ItemCount = ResourceManager.OpenDirectory(id);
PathContainer.ItemCount = ResourceManager.CurrentDirectory.Length;
if (PathContainer.ItemCount >= PathContainer.VisibleLines - 1)
PathContainer.GetComponentInParent<ScrollRect>().velocity = new Vector2(-Screen.width, 0);
}
public void OnObjectItemClicked(int id) {
Master.ShowDetail(id, ResourceManager.GetItemDetail(id));
}
public void OnPathClicked(int id) {
ItemContainer.ItemCount = ResourceManager.ReturnToDirectory(id);
PathContainer.ItemCount = ResourceManager.CurrentDirectory.Length;
}
public void OnAddButtonClicked() {
_dialog.Show();
}
private void OnAddDialogClosed() {
if (_dialog.FileName == null) return;
if (ResourceManager.ImportItemFrom(_dialog.FileName)) {
Popup.Create("Import succeeded");
OnPathClicked(ResourceManager.CurrentDirectory.Length - 1);
}
else {
Popup.Create("Import failed");
}
}
} }
} }

View File

@@ -1,91 +1,107 @@
using Cryville.Common.Unity.UI; using Cryville.Common.Unity;
using Cryville.Crtr.Config.UI; using Cryville.Crtr.Browsing.Actions;
using Cryville.Crtr.UI;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
namespace Cryville.Crtr.Browsing.UI { namespace Cryville.Crtr.Browsing.UI {
public class ResourceBrowserMaster : MonoBehaviour { public class ResourceBrowserMaster : SingletonBehaviour<ResourceBrowserMaster> {
[SerializeField] [SerializeField]
private Button m_playButton; Transform m_tabContainer;
[SerializeField] [SerializeField]
private Button m_configButton; GameObject m_tabPrefab;
[SerializeField] [SerializeField]
private ConfigPanelMaster m_configPanel; Transform m_browserContainer;
[SerializeField]
SettingsBrowser m_settingsBrowser;
private DockLayoutGroup _group; [SerializeField]
public ResourceBrowser MainBrowser { get; private set; } internal GameObject m_pathedBrowserPrefab;
private DetailPanel _detailPanel; [SerializeField]
readonly List<ResourceBrowserUnit> _units = new List<ResourceBrowserUnit>(); internal GameObject m_configBrowserPrefab;
#pragma warning disable IDE0051 BrowserTab _currentTab;
void Awake() { readonly Dictionary<int, BrowserTab> _tabMap = new Dictionary<int, BrowserTab>();
_group = GetComponent<DockLayoutGroup>(); readonly Dictionary<BrowserTab, ResourceBrowser> _tabs = new Dictionary<BrowserTab, ResourceBrowser>();
MainBrowser = transform.GetChild(0).GetComponent<ResourceBrowser>();
MainBrowser.ResourceManager = new LegacyResourceManager(Settings.Default.GameDataPath); public ActionManager Actions { get; private set; }
_detailPanel = transform.GetChild(1).GetComponent<DetailPanel>();
_units.Add(MainBrowser); protected override void Awake() {
_units.Add(_detailPanel); base.Awake();
Actions = new ActionManager();
Actions.Changed += OnActionsChanged;
Actions.Register(new PlayChartAction());
Actions.Register(new OpenConfigAction());
OnTabClicked(AddPathedBrowserTab("Local", new LegacyResourceManager(Settings.Default.GameDataPath)));
AddPathedBrowserTab("Files", new FileSystemResourceManager());
AddTab("Settings", InitBrowser(m_settingsBrowser), _tabs.Count, false);
} }
int _slideDest = 0; BrowserTab AddPathedBrowserTab(string name, IPathedResourceManager<IResourceMeta> manager) {
void Update() { var browser = InitBrowser(Instantiate(m_pathedBrowserPrefab, m_browserContainer, false).GetComponent<PathedResourceBrowser>());
var cv = _group.SlideIndex; browser.Init(manager);
_group.SlideIndex = (cv - _slideDest) * 0.86f + _slideDest; return AddTab(name, browser, _tabs.Count, false);
} }
#pragma warning restore IDE0051 BrowserTab AddTab(string name, ResourceBrowser browser, int index, bool closable) {
var tab = Instantiate(m_tabPrefab, m_tabContainer, false).GetComponent<BrowserTab>();
tab.transform.SetSiblingIndex(index);
tab.Icon = browser.Icon;
tab.Text = name;
tab.Closable = closable;
tab.Clicked += OnTabClicked;
tab.Closed += OnTabClosed;
browser.gameObject.SetActive(false);
_tabs.Add(tab, browser);
_tabMap.Add(tab.GetHashCode(), tab);
return tab;
}
T InitBrowser<T>(T browser) where T : ResourceBrowser { browser.Init(this); return browser; }
public void ShowDetail(int id, ChartDetail detail) { public int AddAndOpenTab(string name, ResourceBrowser browser) {
SlideIntoView(1); InitBrowser(browser);
_detailPanel.Load(id, detail); browser.transform.SetParent(m_browserContainer, false);
m_playButton.gameObject.SetActive(true); var tab = AddTab(name, browser, _currentTab.transform.GetSiblingIndex() + 1, true);
m_configButton.gameObject.SetActive(true); OnTabClicked(tab);
return tab.GetHashCode();
}
public bool TryOpenTab(int id) {
BrowserTab tab;
if (_tabMap.TryGetValue(id, out tab)) {
OnTabClicked(tab);
return true;
}
return false;
} }
/*[Obsolete] void OnTabClicked(BrowserTab tab) {
public void ShowSettings(int id, ChartDetail detail) { if (tab == _currentTab) return;
SlideIntoView(2); if (_currentTab != null) {
_settingsPanel.Load(id, detail); _currentTab.Selected = false;
}*/ _tabs[_currentTab].gameObject.SetActive(false);
}
_currentTab = tab;
if (_currentTab != null) {
_currentTab.Selected = true;
_tabs[_currentTab].gameObject.SetActive(true);
}
}
void OnTabClosed(BrowserTab tab) {
Destroy(tab.gameObject);
Destroy(_tabs[tab].gameObject);
_tabs.Remove(tab);
_tabMap.Remove(tab.GetHashCode());
if (_currentTab == tab) _currentTab = null;
}
void OnActionsChanged() {
foreach (var tab in _tabs) {
tab.Value.OnActionsChanged();
}
}
public bool Back() { public bool Back() {
if (_slideDest == 0) return false; return true; // TODO
SlideIntoView(_slideDest - 1);
return true;
}
private void SlideIntoView(int v) {
v = Mathf.Clamp(v, 0, _units.Count - 1);
var cv = _group.SlideIndex;
if (cv < v) _slideDest = v - 1;
else _slideDest = v;
_units[_slideDest].SlideToLeft();
_units[_slideDest + 1].SlideToRight();
}
public void Open(int id, ChartDetail detail) {
SetDataSettings(id, detail);
#if UNITY_5_3_OR_NEWER
SceneManager.LoadScene("Play", LoadSceneMode.Additive);
#else
Application.LoadLevelAdditive("Play");
#endif
GameObject.Find("/Master").GetComponent<Master>().HideMenu();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
DiscordController.Instance.SetPlaying(string.Format("{0} - {1}", detail.Meta.song.name, detail.Meta.name), detail.Meta.length);
#endif
}
public void OpenConfig(int id, ChartDetail detail) {
SetDataSettings(id, detail);
}
void SetDataSettings(int id, ChartDetail detail) {
Settings.Default.LoadRuleset = detail.Meta.ruleset + "/.umgr";
Settings.Default.LoadRulesetConfig = detail.Meta.ruleset + ".json";
Settings.Default.LoadChart = MainBrowser.ResourceManager.GetItemPath(id);
} }
} }
} }

View File

@@ -1,12 +0,0 @@
using UnityEngine;
namespace Cryville.Crtr.Browsing.UI {
public abstract class ResourceBrowserUnit : MonoBehaviour {
protected ResourceBrowserMaster Master { get; private set; }
protected virtual void Awake() {
Master = GetComponentInParent<ResourceBrowserMaster>();
}
public virtual void SlideToLeft() { }
public virtual void SlideToRight() { }
}
}

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