Compare commits

..

33 Commits

Author SHA1 Message Date
378b00096a Merge pull request 'work_branch' (#13) from work_branch into main
Reviewed-on: #13
2026-05-29 10:40:47 +02:00
Mausham
6d9b096e8e added anim 2026-05-29 14:24:03 +05:45
Mausham
919169157e added some features in artbook 2026-05-29 12:47:21 +05:45
96e69c3d1a Merge pull request 'work_branch' (#12) from work_branch into main
Reviewed-on: #12
2026-05-29 06:52:37 +02:00
Mausham
a51a73efdd fixess 2026-05-29 10:37:07 +05:45
Mausham
3914adaa84 Merge remote-tracking branch 'origin/main' into work_branch
# Conflicts:
#	Assets/Darkmatter/Code/Features/ColorbookFlow/Features.Colorbook.asmdef
#	Assets/Darkmatter/Code/Features/ColorbookFlow/System/ColorbookFlowController.cs
2026-05-29 10:35:04 +05:45
Mausham
4e8f2ae7ad fixes 2026-05-29 10:31:14 +05:45
bdac5b485f Merge pull request 'Game flow and coloring done' (#11) from savya into main
Reviewed-on: #11
2026-05-29 06:45:39 +02:00
Savya Bikram Shah
b3c096a150 Game flow and coloring done 2026-05-28 19:45:15 +05:45
Mausham
9899a8b549 code added for Artbook 2026-05-28 18:48:08 +05:45
Mausham
820f614415 some additional fixes 2026-05-28 18:32:14 +05:45
92aa1d2751 Merge pull request 'Refactored and Animaiton for HOlder' (#10) from savya into main
Reviewed-on: #10
2026-05-28 14:02:15 +02:00
Savya Bikram Shah
9ac752b23c Refactored and Animaiton for HOlder 2026-05-28 17:45:58 +05:45
252c1b8a41 Merge pull request 'work_branch' (#9) from work_branch into main
Reviewed-on: #9
2026-05-28 13:24:44 +02:00
Mausham
f9a2532495 Fixes 2026-05-28 17:09:12 +05:45
Mausham
e6b6683feb Merge remote-tracking branch 'origin/main' into work_branch 2026-05-28 16:54:28 +05:45
b16f535499 Merge pull request 'savya' (#8) from savya into main
Reviewed-on: #8
2026-05-28 13:07:38 +02:00
Mausham
9ad3c34099 rearranged UI 2026-05-28 16:52:36 +05:45
Savya Bikram Shah
09ad3469f2 Loading finalized 2026-05-28 16:52:06 +05:45
Savya Bikram Shah
98fbad9233 Merge remote-tracking branch 'origin/work_branch' into savya
# Conflicts:
#	Assets/Darkmatter/Content/Fonts/static/Fredoka-Bold SDF.asset
#	Assets/Darkmatter/Content/Fonts/static/Fredoka-Medium SDF.asset
#	Assets/Darkmatter/Content/Fonts/static/Fredoka-SemiBold SDF.asset
2026-05-28 16:10:23 +05:45
380e8b63bd Merge pull request 'work_branch' (#7) from work_branch into main
Reviewed-on: #7
2026-05-28 12:24:55 +02:00
Savya Bikram Shah
d239dbd9b5 Loading Done 2026-05-28 16:08:57 +05:45
Mausham
3f14d0b346 completed intro video and mainmenu scene 2026-05-28 15:37:33 +05:45
Mausham
86bf52ced4 Merge remote-tracking branch 'origin/main' into work_branch
# Conflicts:
#	Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuPresenter.cs
#	Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuPresenter.cs.meta
#	Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuView.cs
#	Assets/Darkmatter/Code/Features/MainMenu/Mascot/MainmenuView.cs.meta
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuPresenter.cs
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuPresenter.cs.meta
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuView.cs
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainMenuView.cs.meta
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuPresenter.cs
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuPresenter.cs.meta
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuView.cs
#	Assets/Darkmatter/Code/Features/MainMenu/UI/MainmenuView.cs.meta
2026-05-28 15:11:46 +05:45
Mausham
4064df19bc Merge remote-tracking branch 'origin/main' into work_branch 2026-05-28 15:06:05 +05:45
Mausham
01ec3bec54 fixes 2026-05-28 15:05:57 +05:45
e96fefa642 Merge pull request 'savya' (#6) from savya into main
Reviewed-on: #6
2026-05-28 11:20:23 +02:00
Savya Bikram Shah
0e50fa5e55 Intro done and event after intro 2026-05-28 15:04:47 +05:45
Savya Bikram Shah
f1b0834a72 Merge remote-tracking branch 'origin/main' into savya 2026-05-28 14:44:37 +05:45
Savya Bikram Shah
af5c181f32 Merge remote-tracking branch 'origin/main' into savya 2026-05-28 14:44:13 +05:45
Mausham
f1f3a35c6d Merge remote-tracking branch 'origin/main' into work_branch 2026-05-28 13:39:01 +05:45
Mausham
84fea79158 commit 2026-05-28 13:38:23 +05:45
Mausham
e5b63e158c added gui in color book scene 2026-05-28 12:35:02 +05:45
539 changed files with 130734 additions and 3000 deletions

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 227c245961aab4de9b09eae4fe4a619c guid: c8b638aef696442fdbe1f63b72b29ddb
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dea69d41f90c6ea4fa55c27c1d60c145, type: 3}
m_Name: AddressableAssetGroupSortSettings
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.AddressableAssetGroupSortSettings
sortOrder:
- 86e13c2ac495848d99c739840b7d38e9
- 0e030d5498bfe4ffd8443c796618c539
- c0e2d4d32411e46a6a3dd5cdfa6dbe7e

View File

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

View File

@@ -0,0 +1,118 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
m_Name: AddressableAssetSettings
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetSettings
m_DefaultGroup: 0e030d5498bfe4ffd8443c796618c539
m_currentHash:
serializedVersion: 2
Hash: 11994545ace6358214de1d969c8c1309
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0
m_DisableCatalogUpdateOnStart: 0
m_InternalIdNamingMode: 0
m_InternalBundleIdMode: 1
m_AssetLoadMode: 0
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_EnableJsonCatalog: 0
m_NonRecursiveBuilding: 1
m_AllowNestedBundleFolders: 0
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 3
m_UseUWRForLocalBundles: 0
m_BundleTimeout: 0
m_BundleRetryCount: 0
m_BundleRedirectLimit: -1
m_SharedBundleSettings: 0
m_SharedBundleSettingsCustomGroupIndex: 0
m_simulatedLoadDelay: 0.1
m_ContiguousBundles: 1
m_StripUnityVersionFromBundleBuild: 0
m_DisableVisibleSubAssetRepresentations: 0
m_BuiltInBundleNaming: 0
mBuiltInBundleCustomNaming:
m_MonoScriptBundleNaming: 0
m_CheckForContentUpdateRestrictionsOption: 0
m_MonoScriptBundleCustomNaming:
m_RemoteCatalogBuildPath:
m_Id:
m_RemoteCatalogLoadPath:
m_Id:
m_ContentStateBuildPathProfileVariableName:
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 0
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
m_GroupAssets:
- {fileID: 11400000, guid: 884c7b3ae8a8543379b1b771a9b8ab47, type: 2}
- {fileID: 11400000, guid: fda2e763202c2462b857e04c29824b23, type: 2}
- {fileID: 11400000, guid: 9813579a74a7640e182c85c4bdeb3852, type: 2}
m_BuildSettings:
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: c89112ad434ca42f98f89b640abd8cab
m_ProfileName: Default
m_Values:
- m_Id: 1e7b566e879b2426f9a706a71f9612bf
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: 34a950f5bf1ec43308379e14c27a6107
m_Value: <undefined>
- m_Id: 3738fa70e58064cd68ff0a4fa6751e2c
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: 9c4f75e30fc4c4365b87a65cb2561271
m_Value: 'ServerData/[BuildTarget]'
- m_Id: e2253d243607142b0a072c38c39ccb14
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
m_ProfileEntryNames:
- m_Id: 1e7b566e879b2426f9a706a71f9612bf
m_Name: Local.BuildPath
m_InlineUsage: 0
- m_Id: 34a950f5bf1ec43308379e14c27a6107
m_Name: Remote.LoadPath
m_InlineUsage: 0
- m_Id: 3738fa70e58064cd68ff0a4fa6751e2c
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: 9c4f75e30fc4c4365b87a65cb2561271
m_Name: Remote.BuildPath
m_InlineUsage: 0
- m_Id: e2253d243607142b0a072c38c39ccb14
m_Name: Local.LoadPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: 08cea37bc40c14d2696479a6530b6f35, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 2
m_DataBuilders:
- {fileID: 11400000, guid: f526556ea7afe4e46834c815e9a639cd, type: 2}
- {fileID: 11400000, guid: 3ceb2a1f50919486ab0d61a56d99159b, type: 2}
- {fileID: 11400000, guid: d41d540cab5ec4738be305b83c9580a8, type: 2}
m_ActiveProfileId: c89112ad434ca42f98f89b640abd8cab

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4a94ef317c3674edd8270e4ed15031f6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e2183be643a8c45cf9da3dc66e711220
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3075560517811465438
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 0}
m_StaticContent: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
m_Name: Packed Assets
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroupTemplate
m_SchemaObjects:
- {fileID: 4209391874149243162}
- {fileID: -3075560517811465438}
m_Description: Pack assets into asset bundles.
m_Settings: {fileID: 11400000, guid: 4a94ef317c3674edd8270e4ed15031f6, type: 2}
--- !u!114 &4209391874149243162
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 0}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id:
m_LoadPath:
m_Id:
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 08cea37bc40c14d2696479a6530b6f35
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e17197a018a544cf9a9311abca69fdc6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Default Local Group
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
m_GroupName: Default Local Group
m_GUID: 0e030d5498bfe4ffd8443c796618c539
m_SerializeEntries: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 4a94ef317c3674edd8270e4ed15031f6, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 6e242ee26316a45feafd94b1e8eeec6b, type: 2}
- {fileID: 11400000, guid: 076ccd8096b244b4cbf586866800306c, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 884c7b3ae8a8543379b1b771a9b8ab47
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Scenes
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
m_GroupName: Scenes
m_GUID: 86e13c2ac495848d99c739840b7d38e9
m_SerializeEntries:
- m_GUID: 10aca8a0883a60447b95ad82d2cf3a98
m_Address: MainMenu
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 145ae55f6571bfe4fbadaefb863ba69d
m_Address: Colorbook
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e5f73f24e812e4a98b4c17d533fd3d6d
m_Address: Gameplay
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 4a94ef317c3674edd8270e4ed15031f6, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: a5cf35bcd13d04097ab3d9deda768da4, type: 2}
- {fileID: 11400000, guid: 0a5a80c14fb1540f2b21658407e2ad4e, type: 2}

View File

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

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3788c6b91fad7422a8b4411cbcbab0c2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Default Local Group_BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 11400000, guid: 884c7b3ae8a8543379b1b771a9b8ab47, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 1e7b566e879b2426f9a706a71f9612bf
m_LoadPath:
m_Id: e2253d243607142b0a072c38c39ccb14
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6e242ee26316a45feafd94b1e8eeec6b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Default Local Group_ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 11400000, guid: 884c7b3ae8a8543379b1b771a9b8ab47, type: 2}
m_StaticContent: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 076ccd8096b244b4cbf586866800306c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Scenes_BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 11400000, guid: fda2e763202c2462b857e04c29824b23, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 1e7b566e879b2426f9a706a71f9612bf
m_LoadPath:
m_Id: e2253d243607142b0a072c38c39ccb14
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 1
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0

View File

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

View File

@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Scenes_ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 11400000, guid: fda2e763202c2462b857e04c29824b23, type: 2}
m_StaticContent: 0

View File

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

View File

@@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: unifiedraytracing_BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 11400000, guid: 9813579a74a7640e182c85c4bdeb3852, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 1e7b566e879b2426f9a706a71f9612bf
m_LoadPath:
m_Id: e2253d243607142b0a072c38c39ccb14
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 296bdf7b03b8d43359f85ef04530132c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: unifiedraytracing_ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 11400000, guid: 9813579a74a7640e182c85c4bdeb3852, type: 2}
m_StaticContent: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c11d136385094b86a30ca58bb9290bb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: unifiedraytracing
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
m_GroupName: unifiedraytracing
m_GUID: c0e2d4d32411e46a6a3dd5cdfa6dbe7e
m_SerializeEntries:
- m_GUID: 1ad53a96b58d3c3488dde4f14db1aaeb
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/CopyPositions.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 1b95b5dcf48d1914c9e1e7405c7660e3
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common/Utilities/CopyBuffer.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2d70cd6be91bd7843a39a54b51c15b13
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/build_hlbvh.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4d6d5de35fa45ef4a92119397a045cc9
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/block_scan.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4e034cc8ea2635c4e9f063e5ddc7ea7a
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/block_reduce_part.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 56641cb88dcb31a4398a4997ef7a7a8c
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/restructure_bvh.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 8670f7ce4b60cef43bed36148aa1b0a2
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/bit_histogram.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 98e3d58cae7210c4786f67f504c9e899
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common/GeometryPool/GeometryPoolKernels.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a2eaeefdac4637a44b734e85b7be9186
m_Address: Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/RadeonRays/kernels/scatter.compute
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 4a94ef317c3674edd8270e4ed15031f6, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 296bdf7b03b8d43359f85ef04530132c, type: 2}
- {fileID: 11400000, guid: 7c11d136385094b86a30ca58bb9290bb, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9813579a74a7640e182c85c4bdeb3852
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6efb7b525cc884a3a96c9f783e28c243
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88d21199f5d473f4db36845f2318f180, type: 3}
m_Name: BuildScriptFastMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

View File

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

View File

@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
m_Name: BuildScriptPackedMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

View File

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

View File

@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
m_Name: BuildScriptPackedPlayMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedPlayMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ceb2a1f50919486ab0d61a56d99159b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
m_Name: DefaultObject
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject
m_AddressableAssetSettingsGuid: 4a94ef317c3674edd8270e4ed15031f6

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 732f53b1f9e534015be7dcd28d7032bd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
using Darkmatter.App.LifetimeScopes;
public class ColorBookLifetimeScope : BaseLifetimeScope
{
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8bbdb0f5cdf25c34086f816c59836c9d

View File

@@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using UnityEngine;
namespace Darkmatter.Core.Contracts.Features.Coloring;
public interface IColoringController
{
UniTask InitializeRegionsAsync(IDrawingTemplate template, IReadOnlyDictionary<string, Color> savedColors,
CancellationToken ct);
void PaintRegion(string regionId, Color color);
IReadOnlyDictionary<string, Color> GetCurrentColors();
void Clear();
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b5ba5a7108234751ac286a57795fac06
timeCreated: 1779971202

View File

@@ -10,8 +10,10 @@ namespace Darkmatter.Core.Contracts.Features.DrawingCatalog
string Id { get; } string Id { get; }
string DisplayName { get; } string DisplayName { get; }
Sprite DefaultThumbnail { get; } Sprite DefaultThumbnail { get; }
GameObject Prefab { get; } GameObject DrawingPrefab { get; }
GameObject ColoringPrefab { get; }
IReadOnlyList<ShapeSO> Pieces { get; } IReadOnlyList<ShapeSO> Pieces { get; }
IReadOnlyList<ColorRegionDTO> Regions { get; } IReadOnlyList<ColorRegionDTO> Regions { get; }
string ColorPaletteId { get; }
} }
} }

View File

@@ -0,0 +1,12 @@
using Cysharp.Threading.Tasks;
namespace Darkmatter.Core.Contracts.Features.GameplayFlow
{
public interface IGameplayFlowController
{
UniTask BackAsync();
UniTask SaveAsync();
UniTask NextAsync();
void OnApplicationPaused();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: fee5907f5643d492ab8ba177f84c30f6

View File

@@ -5,9 +5,4 @@ namespace Darkmatter.Core.Contracts.Features.GameplayFlow;
public interface IGameplaySceneRefs public interface IGameplaySceneRefs
{ {
RectTransform PaperRoot { get; } RectTransform PaperRoot { get; }
RectTransform SlotsParent { get; }
RectTransform PiecesParent { get; }
RectTransform RegionsParent { get; }
RectTransform HudRoot { get; }
RectTransform TrayPanel { get; }
} }

View File

@@ -7,9 +7,11 @@ namespace Darkmatter.Core.Contracts.Features.History
event Action OnStackChanged; event Action OnStackChanged;
bool CanUndo { get; } bool CanUndo { get; }
bool CanRedo { get; } bool CanRedo { get; }
void Push(ICommand cmd); // executes + appends void Push(ICommand cmd);
void Append(ICommand cmd);
void Undo(); void Undo();
void Redo(); void Redo();
void Clear(); void Clear(); // reverts every command via Undo, then drops (user-facing "wipe" semantics)
void Drop(); // drops the list without reverting (controller cleanup — avoids touching destroyed views)
} }
} }

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aa96e836f66d5412a8ea6c3ffb0128b1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
namespace Darkmatter.Core.Contracts.Features.Loading;
public interface ILoadingScreen
{
float CurrentProgress { get; }
void Show();
void Hide();
void SetProgress(float progress);
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 95b8a017648e4b2ba45750c4a5c8bc5f
timeCreated: 1771491592

View File

@@ -12,6 +12,9 @@ namespace Darkmatter.Core.Contracts.Features.Progression
IReadOnlyCollection<string> CompletedTemplateIds { get; } IReadOnlyCollection<string> CompletedTemplateIds { get; }
void MarkCompleted(string templateId); void MarkCompleted(string templateId);
string LastOpenedTemplateId { get; }
UniTask SetLastOpenedAsync(string templateId);
DrawingProgress? GetProgress(string templateId); DrawingProgress? GetProgress(string templateId);
UniTask SaveProgressAsync(DrawingProgress progress); UniTask SaveProgressAsync(DrawingProgress progress);
UniTask SaveProgressAsync(DrawingProgress progress, byte[] thumbnailPng); UniTask SaveProgressAsync(DrawingProgress progress, byte[] thumbnailPng);

View File

@@ -1,18 +1,19 @@
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
namespace Darkmatter.Core.Data.Dynamic.Features.Coloring namespace Darkmatter.Core.Data.Dynamic.Features.Coloring
{ {
public readonly struct ColorRegionDTO public readonly struct ColorRegionDTO
{ {
public string RegionId { get; } public string Id { get; }
public Sprite Sprite { get; } public Image Image { get; }
public Vector2 AnchoredPosition { get; } public Vector2 AnchoredPosition { get; }
public Color InitialColor { get; } public Color InitialColor { get; }
public ColorRegionDTO(string regionId, Sprite sprite, Vector2 anchoredPosition, Color initialColor) public ColorRegionDTO(string id, Image image, Vector2 anchoredPosition, Color initialColor)
{ {
RegionId = regionId; Id = id;
Sprite = sprite; Image = image;
AnchoredPosition = anchoredPosition; AnchoredPosition = anchoredPosition;
InitialColor = initialColor; InitialColor = initialColor;
} }

View File

@@ -7,5 +7,6 @@ namespace Darkmatter.Core.Data.Dynamic.Features.Progression
public struct ProgressionRootDto public struct ProgressionRootDto
{ {
public List<DrawingProgress> records; public List<DrawingProgress> records;
public string lastOpenedTemplateId;
} }
} }

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e7d1320ac2ff4ba4ae4bff41efa01e29
timeCreated: 1779959661

View File

@@ -0,0 +1,3 @@
namespace Darkmatter.Core.Data.Signals.Features.AppBoot;
public record struct IntroCompletedSignal();

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a44d51add9914de6bc28b428e13aaecb
timeCreated: 1779959670

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace Darkmatter.Core
{
public record struct OpenArtBookSignal;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: cf8582ced90151445a9fa7b610f59ce9

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace Darkmatter.Core
{
public record struct OpenColorBookSignal;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 73bddc8d591de2a438044c2a9ee180be

View File

@@ -0,0 +1,7 @@
using UnityEngine;
namespace Darkmatter.Core
{
public record struct ReturnToMainMenuSignal;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: fdd1f5bd7186d6244b2311e9f5b18a95

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4c2af4ea812e45de8f189ce182b2a22e
timeCreated: 1779963993

View File

@@ -0,0 +1,3 @@
namespace Darkmatter.Core.Data.Signals.Features.MainMenu;
public record struct PlayBtnClickedSignal();

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3dfe3ef5d7da4861becbc8791ce7c852
timeCreated: 1779964014

View File

@@ -0,0 +1,4 @@
namespace Darkmatter.Core.Data.Signals.Features.ShapeBuilder
{
public record struct ShapeBuilderStartedSignal(string TemplateId);
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 40f2733e19ad34fe5ba5d63aa2e9a39b

View File

@@ -12,8 +12,10 @@ namespace Darkmatter.Core.Data.Static.Features.DrawingTemplate
[field: SerializeField] public string Id { get; private set; } [field: SerializeField] public string Id { get; private set; }
[field: SerializeField] public string DisplayName { get; private set; } [field: SerializeField] public string DisplayName { get; private set; }
[field: SerializeField] public Sprite DefaultThumbnail { get; private set; } [field: SerializeField] public Sprite DefaultThumbnail { get; private set; }
[field: SerializeField] public GameObject Prefab { get; private set; } [field: SerializeField] public GameObject DrawingPrefab { get; private set; }
[field: SerializeField] public GameObject ColoringPrefab { get; private set; }
[field: SerializeField] public IReadOnlyList<ShapeSO> Pieces { get; private set; } [field: SerializeField] public IReadOnlyList<ShapeSO> Pieces { get; private set; }
[field: SerializeField] public IReadOnlyList<ColorRegionDTO> Regions { get; private set; } [field: SerializeField] public IReadOnlyList<ColorRegionDTO> Regions { get; private set; }
[field: SerializeField] public string ColorPaletteId { get; private set; } = "defaultPalette";
} }
} }

View File

@@ -8,7 +8,6 @@ namespace Darkmatter.Core.Data.Static.Features.ShapeBuilder
{ {
[Header("Radii (canvas units; reference resolution 2048x2048)")] [Header("Radii (canvas units; reference resolution 2048x2048)")]
[SerializeField] private float snapRadius = 100f; [SerializeField] private float snapRadius = 100f;
[SerializeField] private float snapGraceMultiplier = 1.5f;
[SerializeField] private float previewRadius = 200f; [SerializeField] private float previewRadius = 200f;
[Header("Tween durations (seconds)")] [Header("Tween durations (seconds)")]

View File

@@ -6,5 +6,6 @@ namespace Darkmatter.Core.Enums.Services.Audio
ShapeHover = 100, ShapeHover = 100,
ShapeSnap = 101, ShapeSnap = 101,
ShapeReturn = 102, ShapeReturn = 102,
UiTap = 200,
} }
} }

View File

@@ -4,6 +4,7 @@
"references": [ "references": [
"GUID:6a0a834eb41764f12ba55c3fb04a40cb", "GUID:6a0a834eb41764f12ba55c3fb04a40cb",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1", "GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc", "GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:f51ebe6a0ceec4240a699833d6309b23" "GUID:f51ebe6a0ceec4240a699833d6309b23"
], ],

View File

@@ -1,8 +1,11 @@
using System.Threading; using System.Threading;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Features.Progression;
using Darkmatter.Core.Contracts.Services.Scenes; using Darkmatter.Core.Contracts.Services.Scenes;
using Darkmatter.Core.Data.Signals.Features.AppBoot;
using Darkmatter.Core.Enums.Services.Scenes; using Darkmatter.Core.Enums.Services.Scenes;
using Darkmatter.Features.AppBoot.SceneRefs; using Darkmatter.Features.AppBoot.SceneRefs;
using Darkmatter.Libs.Observer;
using UnityEngine; using UnityEngine;
using UnityEngine.Video; using UnityEngine.Video;
using VContainer.Unity; using VContainer.Unity;
@@ -13,11 +16,13 @@ namespace Darkmatter.Features.AppBoot.Flow
{ {
private readonly AppBootSceneRefs _sceneRefs; private readonly AppBootSceneRefs _sceneRefs;
private readonly ISceneService _sceneService; private readonly ISceneService _sceneService;
private readonly IEventBus _eventBus;
public AppBootFlow(AppBootSceneRefs sceneRefs, ISceneService sceneService) public AppBootFlow(AppBootSceneRefs sceneRefs, ISceneService sceneService, IEventBus eventBus)
{ {
_sceneRefs = sceneRefs; _sceneRefs = sceneRefs;
_sceneService = sceneService; _sceneService = sceneService;
_eventBus = eventBus;
} }
public async UniTask StartAsync(CancellationToken cancellation = default) public async UniTask StartAsync(CancellationToken cancellation = default)
@@ -33,7 +38,7 @@ namespace Darkmatter.Features.AppBoot.Flow
player.loopPointReached += OnDone; player.loopPointReached += OnDone;
player.Play(); player.Play();
await _sceneService.LoadSceneAsync(GameScene.MainMenu, null, cancellation); await _sceneService.LoadSceneAsync(nameof(GameScene.MainMenu), null, cancellation);
await tcs.Task.AttachExternalCancellation(cancellation); await tcs.Task.AttachExternalCancellation(cancellation);
@@ -44,6 +49,7 @@ namespace Darkmatter.Features.AppBoot.Flow
if (_sceneRefs.IntroCanvas != null) if (_sceneRefs.IntroCanvas != null)
Object.Destroy(_sceneRefs.IntroCanvas.gameObject); Object.Destroy(_sceneRefs.IntroCanvas.gameObject);
Object.Destroy(player.gameObject); Object.Destroy(player.gameObject);
_eventBus.Publish(new IntroCompletedSignal());
} }
} }
} }

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5d8eacd004e3e0649b6ff4a6b58c952c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,21 @@
{
"name": "Features.Artbook",
"rootNamespace": "Darkmatter.Features.Artbook",
"references": [
"GUID:6a0a834eb41764f12ba55c3fb04a40cb",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:6055be8ebefd69e48b49212b09b47b2f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dd1597db9436d6f4da32f1391b905651
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: af74b0a63b3e4a746885f0e4b911cd91
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
using VContainer.Unity;
namespace Darkmatter.Features.Artbook
{
public class ArtBookFeatureModule : MonoBehaviour, IModule
{
[SerializeField] private ArtbookView artbookView;
public void Register(IContainerBuilder builder)
{
if (artbookView != null) builder.RegisterEntryPoint<ArtbookPresenter>().WithParameter(artbookView);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e42bea53c6fa23c45a7c85e9b025bed7

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4a13b92fe0335e04c8de0c5cbc54f6fb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
using System;
using UnityEngine;
namespace Darkmatter.Features.Artbook
{
public record struct ArtbookEntry(string Id, string Name, Texture2D Thumbnail, DateTime UpdatedUtc);
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6821df5d7eb2fe345aeeebd1290d84b3

View File

@@ -0,0 +1,201 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core;
using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using Darkmatter.Core.Contracts.Features.Progression;
using Darkmatter.Core.Contracts.Services.Gallery;
using Darkmatter.Core.Data.Signals.Features.Drawing;
using Darkmatter.Libs.Observer;
using UnityEngine;
using VContainer.Unity;
namespace Darkmatter.Features.Artbook
{
public class ArtbookPresenter : IStartable, IDisposable
{
private const int EntriesPerSpread = 2;
private readonly ArtbookView _view;
private readonly IEventBus _eventBus;
private readonly IProgressionSystem _progression;
private readonly IDrawingTemplateCatalog _catalog;
private readonly IGalleryService _gallery;
private readonly List<ArtbookEntry> _entries = new();
private readonly List<Sprite> _ownedSprites = new();
private readonly List<Texture2D> _ownedTextures = new();
private CancellationTokenSource _cts;
private IDisposable _openSubscription;
private int _currentSpread;
public ArtbookPresenter(
ArtbookView view,
IEventBus eventBus,
IProgressionSystem progression,
IDrawingTemplateCatalog catalog,
IGalleryService gallery)
{
_view = view;
_eventBus = eventBus;
_progression = progression;
_catalog = catalog;
_gallery = gallery;
}
public void Start()
{
_view.OnBackButtonClicked += HandleBackButtonClicked;
_view.OnColorbookButtonClicked += HandleColorbookButtonClicked;
_view.OnPrevSpreadClicked += HandlePrevSpreadClicked;
_view.OnNextSpreadClicked += HandleNextSpreadClicked;
_view.OnLeftSaveClicked += HandleLeftSaveClicked;
_view.OnRightSaveClicked += HandleRightSaveClicked;
_view.OnLeftEditClicked += HandleLeftEditClicked;
_view.OnRightEditClicked += HandleRightEditClicked;
_openSubscription = _eventBus.Subscribe<OpenArtBookSignal>(HandleOpenArtbookEvent);
}
private void HandleOpenArtbookEvent(OpenArtBookSignal signal)
{
_view.Show();
_cts?.Cancel();
_cts?.Dispose();
_cts = new CancellationTokenSource();
LoadAndShowAsync(_cts.Token).Forget();
}
private async UniTaskVoid LoadAndShowAsync(CancellationToken ct)
{
ClearOwnedAssets();
_entries.Clear();
_currentSpread = 0;
await _catalog.FetchAsync();
if (ct.IsCancellationRequested) return;
foreach (var id in _catalog.AllTemplateIds)
{
if (ct.IsCancellationRequested) return;
var progress = _progression.GetProgress(id);
if (progress is not { hasThumbnail: true }) continue;
var texture = await _progression.GetCachedThumbnailAsync(id);
if (ct.IsCancellationRequested) return;
if (texture == null) continue;
var template = await _catalog.LoadAsync(id);
if (ct.IsCancellationRequested) return;
_ownedTextures.Add(texture);
_entries.Add(new ArtbookEntry(id, template.DisplayName, texture, progress.Value.UpdatedUtc));
}
_entries.Sort((a, b) => b.UpdatedUtc.CompareTo(a.UpdatedUtc));
RenderSpread();
}
private void HandlePrevSpreadClicked()
{
if (_currentSpread <= 0) return;
_currentSpread--;
RenderSpread();
}
private void HandleNextSpreadClicked()
{
if (_currentSpread >= TotalSpreads - 1) return;
_currentSpread++;
RenderSpread();
}
private int TotalSpreads => Mathf.Max(1, Mathf.CeilToInt(_entries.Count / (float)EntriesPerSpread));
private void RenderSpread()
{
_view.SetSpread(GetLeftEntry(), SpriteFor(GetLeftEntry()), GetRightEntry(), SpriteFor(GetRightEntry()));
_view.SetNavigation(_currentSpread > 0, _currentSpread < TotalSpreads - 1);
}
private ArtbookEntry? GetLeftEntry()
{
var idx = _currentSpread * EntriesPerSpread;
return idx < _entries.Count ? _entries[idx] : null;
}
private ArtbookEntry? GetRightEntry()
{
var idx = _currentSpread * EntriesPerSpread + 1;
return idx < _entries.Count ? _entries[idx] : null;
}
private Sprite SpriteFor(ArtbookEntry? entry)
{
if (!entry.HasValue) return null;
var tex = entry.Value.Thumbnail;
if (tex == null) return null;
var sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100f);
_ownedSprites.Add(sprite);
return sprite;
}
private void HandleLeftSaveClicked() => SaveToGalleryAsync(GetLeftEntry()).Forget();
private void HandleRightSaveClicked() => SaveToGalleryAsync(GetRightEntry()).Forget();
private async UniTaskVoid SaveToGalleryAsync(ArtbookEntry? entry)
{
if (!entry.HasValue || entry.Value.Thumbnail == null) return;
var ct = _cts?.Token ?? CancellationToken.None;
await _gallery.SaveImageAsync(entry.Value.Thumbnail, entry.Value.Id, ct);
}
private void HandleLeftEditClicked() => OpenForEdit(GetLeftEntry());
private void HandleRightEditClicked() => OpenForEdit(GetRightEntry());
private void OpenForEdit(ArtbookEntry? entry)
{
if (!entry.HasValue) return;
_eventBus.Publish(new DrawingSelectedSignal(entry.Value.Id));
_view.Hide();
}
private void HandleBackButtonClicked()
{
_eventBus.Publish(new OpenColorBookSignal());
_view.Hide();
}
private void HandleColorbookButtonClicked()
{
_eventBus.Publish(new OpenColorBookSignal());
_view.Hide();
}
private void ClearOwnedAssets()
{
foreach (var s in _ownedSprites) UnityEngine.Object.Destroy(s);
foreach (var t in _ownedTextures) UnityEngine.Object.Destroy(t);
_ownedSprites.Clear();
_ownedTextures.Clear();
}
public void Dispose()
{
_view.OnBackButtonClicked -= HandleBackButtonClicked;
_view.OnColorbookButtonClicked -= HandleColorbookButtonClicked;
_view.OnPrevSpreadClicked -= HandlePrevSpreadClicked;
_view.OnNextSpreadClicked -= HandleNextSpreadClicked;
_view.OnLeftSaveClicked -= HandleLeftSaveClicked;
_view.OnRightSaveClicked -= HandleRightSaveClicked;
_view.OnLeftEditClicked -= HandleLeftEditClicked;
_view.OnRightEditClicked -= HandleRightEditClicked;
_openSubscription?.Dispose();
_cts?.Cancel();
_cts?.Dispose();
ClearOwnedAssets();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ce45172769c70e044a56095bc9da281a

View File

@@ -0,0 +1,92 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Darkmatter.Features.Artbook
{
public class ArtbookView : MonoBehaviour
{
[SerializeField] private Button backBtn;
[SerializeField] private Button colorbookBtn;
[Header("Pages")]
[SerializeField] private Image leftPageImage;
[SerializeField] private Image rightPageImage;
[SerializeField] private TMP_Text leftPageNameText;
[SerializeField] private TMP_Text rightPageNameText;
[Header("Page Actions")]
[SerializeField] private Button leftSaveBtn;
[SerializeField] private Button rightSaveBtn;
[SerializeField] private Button leftEditBtn;
[SerializeField] private Button rightEditBtn;
[Header("Navigation")]
[SerializeField] private Button leftArrowBtn;
[SerializeField] private Button rightArrowBtn;
public event Action OnBackButtonClicked;
public event Action OnColorbookButtonClicked;
public event Action OnPrevSpreadClicked;
public event Action OnNextSpreadClicked;
public event Action OnLeftSaveClicked;
public event Action OnRightSaveClicked;
public event Action OnLeftEditClicked;
public event Action OnRightEditClicked;
void Start()
{
backBtn.onClick.AddListener(() => OnBackButtonClicked?.Invoke());
colorbookBtn.onClick.AddListener(() => OnColorbookButtonClicked?.Invoke());
leftArrowBtn.onClick.AddListener(() => OnPrevSpreadClicked?.Invoke());
rightArrowBtn.onClick.AddListener(() => OnNextSpreadClicked?.Invoke());
leftSaveBtn.onClick.AddListener(() => OnLeftSaveClicked?.Invoke());
rightSaveBtn.onClick.AddListener(() => OnRightSaveClicked?.Invoke());
leftEditBtn.onClick.AddListener(() => OnLeftEditClicked?.Invoke());
rightEditBtn.onClick.AddListener(() => OnRightEditClicked?.Invoke());
}
public void Show()
{
gameObject.SetActive(true);
}
public void Hide()
{
gameObject.SetActive(false);
}
public void SetSpread(ArtbookEntry? left, Sprite leftSprite, ArtbookEntry? right, Sprite rightSprite)
{
ApplyPage(leftPageImage, leftPageNameText, leftSaveBtn, leftEditBtn, left, leftSprite);
ApplyPage(rightPageImage, rightPageNameText, rightSaveBtn, rightEditBtn, right, rightSprite);
}
public void SetNavigation(bool canPrev, bool canNext)
{
leftArrowBtn.interactable = canPrev;
rightArrowBtn.interactable = canNext;
}
private static void ApplyPage(Image image, TMP_Text nameText, Button saveBtn, Button editBtn,
ArtbookEntry? entry, Sprite sprite)
{
var hasEntry = entry.HasValue;
saveBtn.interactable = hasEntry;
editBtn.interactable = hasEntry;
if (!hasEntry)
{
image.enabled = false;
image.sprite = null;
nameText.text = string.Empty;
return;
}
image.sprite = sprite;
image.enabled = sprite != null;
nameText.text = entry.Value.Name;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d635629f252db53479e66347a37c4f0b

View File

@@ -4,8 +4,11 @@
"references": [ "references": [
"GUID:6a0a834eb41764f12ba55c3fb04a40cb", "GUID:6a0a834eb41764f12ba55c3fb04a40cb",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1", "GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
"GUID:c176ee863a5e74e88a6517f9f102cf92",
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc", "GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:f51ebe6a0ceec4240a699833d6309b23" "GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:80ecb87cae9c44d19824e70ea7229748"
], ],
"includePlatforms": [], "includePlatforms": [],
"excludePlatforms": [], "excludePlatforms": [],

View File

@@ -10,7 +10,7 @@ namespace Darkmatter.Features.Colorbook.Installers
{ {
public void Register(IContainerBuilder builder) public void Register(IContainerBuilder builder)
{ {
builder.RegisterEntryPoint<ColorbookFlowController>(Lifetime.Singleton); builder.RegisterEntryPoint<ColorbookFlowController>();
} }
} }
} }

View File

@@ -1,16 +1,82 @@
using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using Darkmatter.Core;
using Darkmatter.Core.Contracts.Features.DrawingCatalog; using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using Darkmatter.Core.Contracts.Features.Loading;
using Darkmatter.Core.Contracts.Features.Progression;
using Darkmatter.Core.Contracts.Services.Scenes;
using Darkmatter.Core.Data.Signals.Features.Drawing;
using Darkmatter.Core.Enums.Services.Scenes;
using Darkmatter.Libs.Observer;
using VContainer.Unity; using VContainer.Unity;
namespace Darkmatter.Features.Colorbook.System; namespace Darkmatter.Features.Colorbook.System;
public class ColorbookFlowController : IAsyncStartable public class ColorbookFlowController : IAsyncStartable, IDisposable
{ {
private readonly IDrawingCatalogController _drawingCatalog; private readonly IDrawingCatalogController _drawingCatalog;
private readonly ILoadingScreen _loadingScreen;
private readonly IProgressionSystem _progression;
private readonly ISceneService _scenes;
private readonly IEventBus _bus;
private IDisposable _selectedSub;
private IDisposable _returnToMainMenuSubscription;
public ColorbookFlowController(
IDrawingCatalogController drawingCatalog,
ILoadingScreen loadingScreen,
IProgressionSystem progression,
ISceneService scenes,
IEventBus bus)
{
_drawingCatalog = drawingCatalog;
_loadingScreen = loadingScreen;
_progression = progression;
_scenes = scenes;
_bus = bus;
}
public async UniTask StartAsync(CancellationToken cancellation = new CancellationToken()) public async UniTask StartAsync(CancellationToken cancellation = new CancellationToken())
{ {
_returnToMainMenuSubscription = _bus.Subscribe<ReturnToMainMenuSignal>(OnReturnToMainMenu);
_loadingScreen.SetProgress(1f);
await _drawingCatalog.InitializeAsync(cancellation); await _drawingCatalog.InitializeAsync(cancellation);
_selectedSub = _bus.Subscribe<DrawingSelectedSignal>(OnDrawingSelected);
_loadingScreen.Hide();
}
private void OnReturnToMainMenu(ReturnToMainMenuSignal signal)
{
LoadMainMenuSceneAsync().Forget(UnityEngine.Debug.LogException);
}
private async UniTask LoadMainMenuSceneAsync(CancellationToken ct = default)
{
_loadingScreen.Show();
var progress = new Progress<float>(p => _loadingScreen.SetProgress(p * 0.5f));
await _scenes.LoadSceneAsync(nameof(GameScene.MainMenu), progress, ct);
var mappedProgress = new Progress<float>(p => _loadingScreen.SetProgress(0.5f + p * 0.25f));
await _scenes.UnloadSceneAsync(nameof(GameScene.Colorbook), mappedProgress, ct);
}
private void OnDrawingSelected(DrawingSelectedSignal signal)
{
HandleSelectionAsync(signal.TemplateId).Forget();
}
private async UniTaskVoid HandleSelectionAsync(string templateId)
{
await _progression.SetLastOpenedAsync(templateId);
await _scenes.LoadSceneAsync(GameScene.Gameplay, progress: null, cancellationToken: default);
}
public void Dispose()
{
_selectedSub?.Dispose();
_returnToMainMenuSubscription?.Dispose();
} }
} }

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02004f7c20c0640778c41a7643c2da82
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using Darkmatter.Core.Contracts.Features.History;
using Darkmatter.Features.Coloring.UI;
using UnityEngine;
namespace Darkmatter.Features.Coloring.Commands;
public class ColorRegionCommand : ICommand
{
private readonly ColorRegionView _view;
private readonly Color _from;
private readonly Color _to;
public ColorRegionCommand(ColorRegionView view, Color from, Color to)
{
_view = view;
_from = from;
_to = to;
}
public void Execute() => _view.SetColor(_to);
public void Undo() => _view.SetColor(_from);
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c212dc9aaa7e4445968fee229a715b3b
timeCreated: 1779972906

View File

@@ -1,14 +1,28 @@
using Darkmatter.Core.Contracts.Features.Coloring;
using Darkmatter.Features.Coloring.Systems;
using Darkmatter.Features.Coloring.UI;
using Darkmatter.Libs.Installers; using Darkmatter.Libs.Installers;
using UnityEngine; using UnityEngine;
using VContainer; using VContainer;
using VContainer.Unity;
namespace Darkmatter.Features.Coloring namespace Darkmatter.Features.Coloring
{ {
public class ColoringFeatureModule : MonoBehaviour,IModule public class ColoringFeatureModule : MonoBehaviour, IModule
{ {
[SerializeField] private ColorPaletteHolderView paletteHolderView;
public void Register(IContainerBuilder builder) public void Register(IContainerBuilder builder)
{ {
if (paletteHolderView != null)
{
builder.RegisterComponent(paletteHolderView);
builder.RegisterEntryPoint<ColorPaletteHolderPresenter>().WithParameter(paletteHolderView);
}
builder.Register<IColorButtonFactory, ColorButtonFactory>(Lifetime.Singleton);
builder.Register<ColoringStateRepository>(Lifetime.Singleton);
builder.Register<IColoringController, ColoringController>(Lifetime.Singleton);
} }
} }
} }

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 569e45483f54348a593b6571740cd8a2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using Darkmatter.Core.Contracts.Services.Audio;
using Darkmatter.Features.Coloring.UI;
using UnityEngine;
namespace Darkmatter.Features.Coloring.Systems;
public class ColorButtonFactory : IColorButtonFactory
{
private readonly ColorPaletteHolderView _holder;
private readonly ColoringStateRepository _repository;
private readonly ISfxPlayer _sfx;
public ColorButtonFactory(
ColorPaletteHolderView holder,
ColoringStateRepository repository,
ISfxPlayer sfx)
{
_holder = holder;
_repository = repository;
_sfx = sfx;
}
public ColorButton Create(GameObject prefab, Color color)
{
var go = Object.Instantiate(prefab, _holder.SpawnRoot);
var btn = go.GetComponent<ColorButton>();
btn.Setup(color, _repository, _sfx);
return btn;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1bba9a928a76471391068acd46c4f684
timeCreated: 1779970637

View File

@@ -0,0 +1,146 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Features.Coloring;
using Darkmatter.Core.Contracts.Features.DrawingCatalog;
using Darkmatter.Core.Contracts.Features.GameplayFlow;
using Darkmatter.Core.Contracts.Features.History;
using Darkmatter.Core.Contracts.Services.Assets;
using Darkmatter.Core.Data.Signals.Features.Coloring;
using Darkmatter.Core.Data.Static.Features.Coloring;
using Darkmatter.Features.Coloring.Commands;
using Darkmatter.Features.Coloring.UI;
using Darkmatter.Libs.Observer;
using UnityEngine;
using ZLinq;
namespace Darkmatter.Features.Coloring.Systems;
public class ColoringController : IColoringController, IDisposable
{
private const string ColorButtonPrefabKey = "colorButton";
private readonly ColoringStateRepository _repository;
private readonly IColorButtonFactory _buttonFactory;
private readonly IEventBus _bus;
private readonly IAssetProviderService _assetProviderService;
private readonly IUndoStack _history;
private readonly IGameplaySceneRefs _refs;
private GameObject _colorInstance;
private GameObject _colorButtonPrefab;
private readonly List<ColorRegionView> _regions = new();
private readonly List<ColorButton> _buttons = new();
public ColoringController(
ColoringStateRepository repository,
IColorButtonFactory buttonFactory,
IEventBus bus,
IAssetProviderService assetProviderService,
IUndoStack history,
IGameplaySceneRefs refs)
{
_repository = repository;
_buttonFactory = buttonFactory;
_bus = bus;
_assetProviderService = assetProviderService;
_history = history;
_refs = refs;
}
public async UniTask InitializeRegionsAsync(IDrawingTemplate template,
IReadOnlyDictionary<string, Color> savedColors, CancellationToken ct)
{
Clear();
await TryLoadColorButtonPrefabAsync(ct);
ct.ThrowIfCancellationRequested();
await TryLoadColorPaletteAsync(template, ct);
ct.ThrowIfCancellationRequested();
CreateColorButtonInstances();
InitializeColorRegions(template, savedColors);
}
public void PaintRegion(string regionId, Color color)
{
var region = _regions.AsValueEnumerable().FirstOrDefault(r => r.RegionId == regionId);
if (region == null) return;
var from = region.Color;
_history.Push(new ColorRegionCommand(region, from, color));
_bus.Publish(new ColorAppliedSignal(regionId, color));
}
public IReadOnlyDictionary<string, Color> GetCurrentColors()
{
var snapshot = new Dictionary<string, Color>(_regions.Count);
foreach (var region in _regions)
snapshot[region.RegionId] = region.Color;
return snapshot;
}
public void Clear()
{
_history.Drop();
foreach (var button in _buttons)
if (button != null) UnityEngine.Object.Destroy(button.gameObject);
_buttons.Clear();
_regions.Clear();
if (_colorInstance != null)
{
UnityEngine.Object.Destroy(_colorInstance);
_colorInstance = null;
}
}
public void Dispose() => Clear();
private void InitializeColorRegions(IDrawingTemplate template, IReadOnlyDictionary<string, Color> savedColors)
{
_colorInstance = UnityEngine.Object.Instantiate(template.ColoringPrefab, _refs.PaperRoot);
var views = _colorInstance.GetComponentsInChildren<ColorRegionView>(includeInactive: true);
foreach (var region in views)
{
var id = region.RegionId;
var authoredColor = region.Color;
var resumeColor = savedColors != null && savedColors.TryGetValue(id, out var saved)
? saved
: authoredColor;
if (resumeColor != authoredColor)
_history.Append(new ColorRegionCommand(region, authoredColor, resumeColor));
_regions.Add(region);
region.Initialize(resumeColor, () => PaintRegion(id, _repository.SelectedColor));
}
}
private async UniTask TryLoadColorButtonPrefabAsync(CancellationToken ct)
{
if (_colorButtonPrefab != null) return;
_colorButtonPrefab = await _assetProviderService.LoadAssetAsync<GameObject>(
ColorButtonPrefabKey, progress: null, cancellationToken: ct);
if (_colorButtonPrefab == null)
throw new Exception($"No color button prefab at '{ColorButtonPrefabKey}'");
}
private async UniTask TryLoadColorPaletteAsync(IDrawingTemplate template, CancellationToken ct)
{
var palette = await _assetProviderService.LoadAssetAsync<ColorPaletteSO>(
template.ColorPaletteId, progress: null, cancellationToken: ct);
if (palette == null)
throw new Exception($"No color palette at '{template.ColorPaletteId}'");
_repository.SetPalette(palette);
}
private void CreateColorButtonInstances()
{
foreach (var color in _repository.SelectedPalette.Colors)
_buttons.Add(_buttonFactory.Create(_colorButtonPrefab, color));
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0849f8cc757842278c38ee6f4d61b985
timeCreated: 1779971175

View File

@@ -0,0 +1,33 @@
using System;
using Darkmatter.Core.Contracts.Features.Coloring;
using UnityEngine;
namespace Darkmatter.Features.Coloring.Systems;
public class ColoringStateRepository
{
public IColorPalette SelectedPalette { get; private set; }
public int SelectedIndex { get; private set; }
public Color SelectedColor =>
SelectedPalette != null && SelectedIndex >= 0 && SelectedIndex < SelectedPalette.Colors.Count
? SelectedPalette.Colors[SelectedIndex]
: Color.white;
public event Action SelectedIndexChanged;
public void SetPalette(IColorPalette palette)
{
SelectedPalette = palette;
SelectedIndex = 0;
SelectedIndexChanged?.Invoke();
}
public void SelectColor(Color color)
{
if (SelectedPalette == null) return;
var idx = SelectedPalette.Colors.IndexOf(color);
if (idx < 0) return;
SelectedIndex = idx;
SelectedIndexChanged?.Invoke();
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a288824e4f554000994bec451c09957c
timeCreated: 1779970861

View File

@@ -0,0 +1,9 @@
using Darkmatter.Features.Coloring.UI;
using UnityEngine;
namespace Darkmatter.Features.Coloring.Systems;
public interface IColorButtonFactory
{
ColorButton Create(GameObject prefab,Color color);
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 91b71be7f45a41cbb17492f82a3f0967
timeCreated: 1779970564

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