From 9dc531e6e9d4e42ecf9427400955d5f188d4c4fa Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Mon, 5 Jan 2026 02:57:20 +0900 Subject: [PATCH 1/6] =?UTF-8?q?red=20dot=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quest/new_\354\225\214\353\236\214.png" | Bin 0 -> 522 bytes .../new_\354\225\214\353\236\214.png.meta" | 140 ++++++++++++++++++ Assets/Prefabs/Quest/QuestSlotItem_day.prefab | 79 +++++++++- .../Prefabs/Quest/QuestSlotItem_main.prefab | 79 +++++++++- Assets/Prefabs/Quest/QuestSlotItem_sub.prefab | 79 +++++++++- Assets/Scenes/Quest.unity | 67 +++++++++ Assets/Scripts/QuestSystem/DailyQuestLogic.cs | 2 + Assets/Scripts/QuestSystem/QuestCommon.cs | 3 + .../QuestSystem/QuestListController.cs | 42 +++++- Assets/Scripts/QuestSystem/QuestManager.cs | 3 + Assets/Scripts/QuestSystem/QuestSlotUI.cs | 45 +++++- 11 files changed, 533 insertions(+), 6 deletions(-) create mode 100644 "Assets/Image/Quest/new_\354\225\214\353\236\214.png" create mode 100644 "Assets/Image/Quest/new_\354\225\214\353\236\214.png.meta" diff --git "a/Assets/Image/Quest/new_\354\225\214\353\236\214.png" "b/Assets/Image/Quest/new_\354\225\214\353\236\214.png" new file mode 100644 index 0000000000000000000000000000000000000000..68c5f630a0782ee7f8b37ea5b158e46544f13a3d GIT binary patch literal 522 zcmV+l0`>igP)p+ z!!Q&)r{XuB03{n_1Ih#~8+3z;2@n$i6HqoN8V!N1-(nK*Q<;#li zp3m<+E1bX%$j^ZDJ@CO#?T2$-rU165=Bp#5+LO(NECVh*srBRXv=#8e=St>K%=8l2 zIiixJxA+!9M69FV8zGXcKY_`raVXiXwMy5fu?jWD7>Vgj>a6Ft7#p z>Mhq_qmGXIhzoq)J8 z3-4LsQcYlx2vwBcS)`aF4YYDxvKP9shyx|kLQh<}Ygs{A_vk4@!J>PWq7wnRS)@l3 zvpyGz! zUBM|E42Lwj?cQaN{UzYBtz0MUn^iU<-_V7d_S|DfrW`hNe^kaNTAMr^n}*k_=m@M+ zz>7$Am-G}Y#3g^U(u!+up(I7+HuKLSRp^PR>l*o%Xl1PUpCav#FQia&WFt#@RR910 M07*qoM6N<$f{j<%QUCw| literal 0 HcmV?d00001 diff --git "a/Assets/Image/Quest/new_\354\225\214\353\236\214.png.meta" "b/Assets/Image/Quest/new_\354\225\214\353\236\214.png.meta" new file mode 100644 index 0000000..2c1eecb --- /dev/null +++ "b/Assets/Image/Quest/new_\354\225\214\353\236\214.png.meta" @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: f85895579871b564eb2abdbcff2228de +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Quest/QuestSlotItem_day.prefab b/Assets/Prefabs/Quest/QuestSlotItem_day.prefab index 57de4c2..6c3dbce 100644 --- a/Assets/Prefabs/Quest/QuestSlotItem_day.prefab +++ b/Assets/Prefabs/Quest/QuestSlotItem_day.prefab @@ -1,5 +1,80 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &4927440848435185005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1035685805839552472} + - component: {fileID: 79434177200605269} + - component: {fileID: 7948163439528758103} + m_Layer: 5 + m_Name: RedDot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1035685805839552472 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4927440848435185005} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2869413995972454919} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 245, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &79434177200605269 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4927440848435185005} + m_CullTransparentMesh: 1 +--- !u!114 &7948163439528758103 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4927440848435185005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: f85895579871b564eb2abdbcff2228de, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &4978352096589980354 GameObject: m_ObjectHideFlags: 0 @@ -33,11 +108,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 792312420822627817} + - {fileID: 1035685805839552472} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 5, y: 282} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 600, y: 72} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7482959797435427137 @@ -93,6 +169,7 @@ MonoBehaviour: titleText: {fileID: 4155861879290532093} normalSprite: {fileID: 21300000, guid: 7db56a44781624be8a5086856886c3db, type: 3} selectedSprite: {fileID: 21300000, guid: ecd20a1ec3b74406e8f21ed249836b55, type: 3} + newDotObject: {fileID: 4927440848435185005} --- !u!114 &9002464839369892319 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Quest/QuestSlotItem_main.prefab b/Assets/Prefabs/Quest/QuestSlotItem_main.prefab index 55a866a..4edbc5f 100644 --- a/Assets/Prefabs/Quest/QuestSlotItem_main.prefab +++ b/Assets/Prefabs/Quest/QuestSlotItem_main.prefab @@ -1,5 +1,80 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &940896229049801155 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1635040505915487294} + - component: {fileID: 2080939274363057120} + - component: {fileID: 4004841376542591627} + m_Layer: 5 + m_Name: RedDot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1635040505915487294 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940896229049801155} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8366413650240521402} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 245, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2080939274363057120 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940896229049801155} + m_CullTransparentMesh: 1 +--- !u!114 &4004841376542591627 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940896229049801155} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: f85895579871b564eb2abdbcff2228de, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &7379731343046769735 GameObject: m_ObjectHideFlags: 0 @@ -33,11 +108,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 3712012157206379426} + - {fileID: 1635040505915487294} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 282} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 600, y: 72} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8383538684993988236 @@ -93,6 +169,7 @@ MonoBehaviour: titleText: {fileID: 4648224122013648431} normalSprite: {fileID: 21300000, guid: 6ce83067b7dd24d8bb5683a1c3a24949, type: 3} selectedSprite: {fileID: 21300000, guid: 48d94b9535e48476382d2eb3d975be8d, type: 3} + newDotObject: {fileID: 940896229049801155} --- !u!114 &1586773135664699207 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Quest/QuestSlotItem_sub.prefab b/Assets/Prefabs/Quest/QuestSlotItem_sub.prefab index c8ccc8f..cd27b62 100644 --- a/Assets/Prefabs/Quest/QuestSlotItem_sub.prefab +++ b/Assets/Prefabs/Quest/QuestSlotItem_sub.prefab @@ -33,11 +33,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1269099425031327134} + - {fileID: 5085128749523569592} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 5, y: 282} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 600, y: 72} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &717825412030808754 @@ -93,6 +94,7 @@ MonoBehaviour: titleText: {fileID: 5547243845708146975} normalSprite: {fileID: 21300000, guid: 63c54f46de767478399655f59b4e87e3, type: 3} selectedSprite: {fileID: 21300000, guid: 358fa577fa41c44d594e5eb607dc7a0f, type: 3} + newDotObject: {fileID: 9007323182050288440} --- !u!114 &8395065139777901685 MonoBehaviour: m_ObjectHideFlags: 0 @@ -271,3 +273,78 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &9007323182050288440 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5085128749523569592} + - component: {fileID: 3315164729349608538} + - component: {fileID: 1585314199962342638} + m_Layer: 5 + m_Name: RedDot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5085128749523569592 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9007323182050288440} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6470883030445979389} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 245, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3315164729349608538 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9007323182050288440} + m_CullTransparentMesh: 1 +--- !u!114 &1585314199962342638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9007323182050288440} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: f85895579871b564eb2abdbcff2228de, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/Scenes/Quest.unity b/Assets/Scenes/Quest.unity index 0440891..a874de8 100644 --- a/Assets/Scenes/Quest.unity +++ b/Assets/Scenes/Quest.unity @@ -870,6 +870,55 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 374979958} m_CullTransparentMesh: 1 +--- !u!1 &405175117 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 405175118} + - component: {fileID: 405175119} + m_Layer: 0 + m_Name: SoundManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &405175118 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 405175117} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1107534421} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &405175119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 405175117} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 754ad1723ec644848ad41ba3bd943f1a, type: 3} + m_Name: + m_EditorClassIdentifier: + sfxSource: {fileID: 0} + bgmSource: {fileID: 0} + fadeDuration: 0.3 + sfxList: [] + bgmList: [] --- !u!1 &420783989 GameObject: m_ObjectHideFlags: 0 @@ -2111,6 +2160,7 @@ Transform: - {fileID: 516585730} - {fileID: 2043172466} - {fileID: 1669008416} + - {fileID: 405175118} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1208130146 @@ -3382,9 +3432,14 @@ MonoBehaviour: researchLabPopup: {fileID: 0} storePopup: {fileID: 0} collectionPopup: {fileID: 0} + questPopup: {fileID: 0} alertPopup: {fileID: 727452931} alertMessageText: {fileID: 277646680} alertCloseButton: {fileID: 234476262} + confirmPopup: {fileID: 0} + confirmText: {fileID: 0} + confirmYesButton: {fileID: 0} + confirmNoButton: {fileID: 0} itemAcquiredPopup: {fileID: 0} itemAcquiredIcon: {fileID: 0} itemAcquiredNameText: {fileID: 0} @@ -3701,6 +3756,10 @@ PrefabInstance: propertyPath: m_Name value: QuestSlotItem_sub objectReference: {fileID: 0} + - target: {fileID: 5085128749523569592, guid: 311a3958fb840d742806da796b179fc6, type: 3} + propertyPath: m_AnchoredPosition.x + value: 245 + objectReference: {fileID: 0} - target: {fileID: 5547243845708146975, guid: 311a3958fb840d742806da796b179fc6, type: 3} propertyPath: m_HorizontalAlignment value: 1 @@ -3802,6 +3861,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1471804407} m_Modifications: + - target: {fileID: 1635040505915487294, guid: 173a0be5753401842bcc0b413864b6e5, type: 3} + propertyPath: m_AnchoredPosition.x + value: 245 + objectReference: {fileID: 0} - target: {fileID: 3712012157206379426, guid: 173a0be5753401842bcc0b413864b6e5, type: 3} propertyPath: m_SizeDelta.x value: 400 @@ -4047,6 +4110,10 @@ PrefabInstance: propertyPath: m_AnchoredPosition.x value: 60 objectReference: {fileID: 0} + - target: {fileID: 1035685805839552472, guid: 0e808062ef84ce14db9063fa0967f568, type: 3} + propertyPath: m_AnchoredPosition.x + value: 245 + objectReference: {fileID: 0} - target: {fileID: 2869413995972454919, guid: 0e808062ef84ce14db9063fa0967f568, type: 3} propertyPath: m_Pivot.x value: 0.5 diff --git a/Assets/Scripts/QuestSystem/DailyQuestLogic.cs b/Assets/Scripts/QuestSystem/DailyQuestLogic.cs index 299d2f0..bdc3338 100644 --- a/Assets/Scripts/QuestSystem/DailyQuestLogic.cs +++ b/Assets/Scripts/QuestSystem/DailyQuestLogic.cs @@ -137,6 +137,7 @@ public static void ConfigureDailyQuests(List dailyQuests, int targetC quest.rewardAmount = rewardInfo.amount; quest.state = QuestState.Active; + quest.isNewlyOpened = true; // 빨간 점 추가 quest.currentCount = 0; quest.rewardClaimed = false; @@ -171,6 +172,7 @@ private static void ResetDailyQuestStates(List dailyQuests) quest.state = QuestState.Locked; quest.currentCount = 0; quest.rewardClaimed = false; + quest.isNewlyOpened = false; // 빨간점 잔상 추가 // 일일 퀘스트는 1조건만 사용 quest.currentCounts = new int[1] { 0 }; diff --git a/Assets/Scripts/QuestSystem/QuestCommon.cs b/Assets/Scripts/QuestSystem/QuestCommon.cs index 55e2229..133c18c 100644 --- a/Assets/Scripts/QuestSystem/QuestCommon.cs +++ b/Assets/Scripts/QuestSystem/QuestCommon.cs @@ -34,6 +34,9 @@ public class QuestData public int currentCount = 0; // 현재 달성 수치 public bool rewardClaimed = false; // 보상 수령 여부 + [Header("UI 상태")] + public bool isNewlyOpened = false; // 새로 열린 퀘스트(빨간 점) + [Header("달성 조건")] public string[] conditionTexts; // 조건 설명들 public int[] targetCounts; // 각 조건의 목표 수치 diff --git a/Assets/Scripts/QuestSystem/QuestListController.cs b/Assets/Scripts/QuestSystem/QuestListController.cs index 5c9bfc4..b3a14f2 100644 --- a/Assets/Scripts/QuestSystem/QuestListController.cs +++ b/Assets/Scripts/QuestSystem/QuestListController.cs @@ -163,8 +163,9 @@ private void CreateSlot(GameObject prefab, QuestData data) // 첫 슬롯 자동 선택 if (currentSelectedSlot == null) { - OnSlotClicked(ui); + SelectSlot(ui, false); // ✅ 자동 선택(유저 클릭 아님) → 점 안 꺼짐 } + } } @@ -194,8 +195,13 @@ public void OnClickBoxIcon() RefreshSlots(); } - // 클릭 이벤트 발생 알림이 올 때 호출되는 함수 public void OnSlotClicked(QuestSlotUI clickedSlot) + { + SelectSlot(clickedSlot, true); // ✅ 유저 클릭 + } + + // 클릭 이벤트 발생 알림이 올 때 호출되는 함수 + private void SelectSlot(QuestSlotUI clickedSlot, bool isUserClick) { if (clickedSlot == null) return; @@ -210,6 +216,10 @@ public void OnSlotClicked(QuestSlotUI clickedSlot) currentSelectedSlot = clickedSlot; currentSelectedSlot.SetSelected(true); + // ✅ 유저가 눌렀을 때만 "새로 열림" 해제 + if (isUserClick) + MarkQuestAsSeen(clickedSlot); + // 3) 상세사항 보여주는 오른쪽 패널 업데이트 if (questDetailUI != null) { @@ -229,6 +239,34 @@ public void OnSlotClicked(QuestSlotUI clickedSlot) } + private void MarkQuestAsSeen(QuestSlotUI clickedSlot) + { + QuestData data = clickedSlot.GetQuest(); + bool isDaily = clickedSlot.IsDailySlot() || (data != null && data.type == QuestType.Daily); + + if (isDaily) + { + var qm = QuestManager.Instance; + if (qm != null && qm.dailyQuests != null) + { + foreach (var q in qm.dailyQuests) + { + if (q == null) continue; + if (q.state == QuestState.Active || q.state == QuestState.Completed) + q.isNewlyOpened = false; + } + } + } + else + { + if (data != null) + data.isNewlyOpened = false; + } + + // 클릭한 슬롯의 점 즉시 갱신 + clickedSlot.RefreshNewDot(); + } + // 자식 모두 삭제 private void ClearChildren(Transform parent) { diff --git a/Assets/Scripts/QuestSystem/QuestManager.cs b/Assets/Scripts/QuestSystem/QuestManager.cs index 19ae6ae..c055e38 100644 --- a/Assets/Scripts/QuestSystem/QuestManager.cs +++ b/Assets/Scripts/QuestSystem/QuestManager.cs @@ -158,6 +158,7 @@ private void InitializeQuestStates() q.state = QuestState.Locked; q.currentCount = 0; q.rewardClaimed = false; + q.isNewlyOpened = false; } } @@ -191,6 +192,7 @@ private void MainQuestSlot() if (q.state == QuestState.Locked) { q.state = QuestState.Active; + q.isNewlyOpened = true; Debug.Log($"[QuestManager] 메인 퀘스트 새로 오픈: key={q.key}, title={q.title}"); return; } @@ -219,6 +221,7 @@ private void SubQuestSlot(int targetCount) if (q.state == QuestState.Locked) { q.state = QuestState.Active; + q.isNewlyOpened = true; openCount++; Debug.Log($"[QuestManager] 서브 퀘스트 오픈: key={q.key}, title={q.title}"); } diff --git a/Assets/Scripts/QuestSystem/QuestSlotUI.cs b/Assets/Scripts/QuestSystem/QuestSlotUI.cs index 1616abe..6e3878c 100644 --- a/Assets/Scripts/QuestSystem/QuestSlotUI.cs +++ b/Assets/Scripts/QuestSystem/QuestSlotUI.cs @@ -9,7 +9,10 @@ public class QuestSlotUI : MonoBehaviour [Header("슬롯 이미지 (클릭 시 테두리)")] [SerializeField] private Sprite normalSprite; - [SerializeField] private Sprite selectedSprite; + [SerializeField] private Sprite selectedSprite; + + [Header("새로 열린 퀘스트 (빨간 점)")] + [SerializeField] private GameObject newDotObject; private QuestData boundQuest; private bool isDailySlot = false; @@ -51,6 +54,8 @@ public void Setup(QuestData data) // 새로운 데이터 바인딩 시 초기화 SetSelected(false); + RefreshNewDot(); + } public void SetOwner(QuestListController controller) @@ -102,4 +107,42 @@ public bool IsDailySlot() { return isDailySlot; } + + public void RefreshNewDot() + { + if (newDotObject == null) + return; + + bool show = false; + + if (boundQuest == null) + { + newDotObject.SetActive(false); + return; + } + + if (isDailySlot) + { + var qm = QuestManager.Instance; + if (qm != null && qm.dailyQuests != null) + { + foreach (var q in qm.dailyQuests) + { + if (q == null) continue; + if ((q.state == QuestState.Active || q.state == QuestState.Completed) && q.isNewlyOpened) + { + show = true; + break; + } + } + } + } + else + { + show = boundQuest.isNewlyOpened; + } + + newDotObject.SetActive(show); + } + } \ No newline at end of file From ee21ea2102455d85c224f705fdf25b8df2ee7fb2 Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Tue, 6 Jan 2026 22:07:37 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=ED=80=98=EC=8A=A4=ED=8A=B8=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=EB=8F=84=20=EC=B6=94=EC=A0=81=20:=20=EC=A7=84?= =?UTF-8?q?=ED=99=94=20=EC=8B=A4=ED=8C=A8=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Farm/Field.cs | 11 +- Assets/Scripts/Manager/PoingManager.cs | 4 + Assets/Scripts/QuestSystem/QuestCommon.cs | 36 +++- Assets/Scripts/QuestSystem/QuestManager.cs | 203 ++++++++++++++++++++- Assets/Scripts/ResearchLab.cs | 11 +- Assets/Scripts/UI/InventoryUI.cs | 3 + Assets/Scripts/UI/StoreUI.cs | 33 ++++ 7 files changed, 294 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/Farm/Field.cs b/Assets/Scripts/Farm/Field.cs index 52d5c9e..4b1c439 100644 --- a/Assets/Scripts/Farm/Field.cs +++ b/Assets/Scripts/Farm/Field.cs @@ -153,6 +153,9 @@ public void Plant(ItemData seed) Debug.Log(seed.itemName + "을(를) 심었습니다."); UpdateFieldVisual(); // (필요 시 plantedSprite로 변경) + + // 퀘스트 진행도: "심기" + QuestManager.Instance?.NotifyAction(QuestConditionType.PlantCrop, seed, 1); } // 비료 개수에 따른 최종 성장 속도 배율 계산 @@ -191,7 +194,10 @@ public void ApplyFertilizer(int count) growCoroutine = StartCoroutine(GrowRoutine(remainingTime)); Debug.Log($"{count}개 비료 적용. 새 배율: {newMultiplier}배. 남은 시간: {remainingTime:F2}초"); -} + + // 퀘스트 진행도: 비료 주입 + QuestManager.Instance?.NotifyAction(QuestConditionType.UseFertilizer, null, count); + } public void Harvest() { @@ -206,6 +212,9 @@ public void Harvest() // 성공 로직 (인벤토리 추가 등) InventoryManager.Instance.AddItem(plantedSeed.harvestItem, 1); + // 퀘스트 진행도: 수확(특정 작물 필터는 conditionItems로 처리) + QuestManager.Instance?.NotifyAction(QuestConditionType.HarvestCrop, plantedSeed.harvestItem, 1); + if (plantInstance != null) Destroy(plantInstance); plantedSeed = null; currentState = FieldState.Empty; diff --git a/Assets/Scripts/Manager/PoingManager.cs b/Assets/Scripts/Manager/PoingManager.cs index 8b18d3a..e8c4554 100644 --- a/Assets/Scripts/Manager/PoingManager.cs +++ b/Assets/Scripts/Manager/PoingManager.cs @@ -72,6 +72,10 @@ public void DecreasePoing(int amount) OnPoingChanged?.Invoke(currentPoing); Debug.Log(amount + " 포잉 사용."); + // 퀘스트 진행도 : 포잉 소비 누적 + if (QuestManager.Instance != null) + QuestManager.Instance.NotifyAction(QuestConditionType.SpendPoing, null, amount); + SaveToDB(); } diff --git a/Assets/Scripts/QuestSystem/QuestCommon.cs b/Assets/Scripts/QuestSystem/QuestCommon.cs index 133c18c..b125a8a 100644 --- a/Assets/Scripts/QuestSystem/QuestCommon.cs +++ b/Assets/Scripts/QuestSystem/QuestCommon.cs @@ -1,4 +1,3 @@ -using System.Collections; using UnityEngine; [System.Serializable] @@ -42,6 +41,11 @@ public class QuestData public int[] targetCounts; // 각 조건의 목표 수치 public int[] currentCounts; // 각 조건의 현재 수치 + [Header("달성 미션 진행도 추적")] + public QuestConditionType[] conditionTypes; // ⭐ 위 배열들과 같은 길이 + public ItemData[] conditionItems; // ⭐ 특정 아이템 조건이면 넣고, 아니면 null + public bool[] countByAmount; // ⭐ 판매/구매/비료: true면 개수(amount)로, false면 1회로 카운트 + [Header("보상 정보")] public ItemData rewardItem; public int rewardKey; // 보상 아이템 ID @@ -58,3 +62,33 @@ public class QuestData public DailyQuestTargetConfig dailyTargets; } +// (밭) 심기, 수확, 비료 주입 +// (상점) 판매, 구매(수확도구,꾸미기테마,작물 씨앗,물약) +// (연구실) 진화 성공, (5연속 성공), 진화 실패 +// (포잉) 골드 소비 +// (기타) 7일 연속 접속 + +public enum QuestConditionType +{ + None = 0, + + // (밭) + PlantCrop, + HarvestCrop, + UseFertilizer, + + // (상점) + SellItem, + BuySeed, + BuyPotion, + BuyTool, // 수확도구 포함 + BuyTheme, + + // (연구실) + EvolveSuccess, + EvolveFail, + EvolveSuccessStreak, // 5연속 성공 + + // (포잉) + SpendPoing // 골드 소비(금액 누적) +} diff --git a/Assets/Scripts/QuestSystem/QuestManager.cs b/Assets/Scripts/QuestSystem/QuestManager.cs index c055e38..29319fe 100644 --- a/Assets/Scripts/QuestSystem/QuestManager.cs +++ b/Assets/Scripts/QuestSystem/QuestManager.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -//using System.Diagnostics; using UnityEngine; public class QuestManager : MonoBehaviour @@ -48,6 +47,8 @@ private void InitializeIfNeeded() BuildQuestLists(); InitializeQuestStates(); OpenInitialSlots(); + RebuildActiveConditionIndex(); + Debug.Log($"[QuestManager] 초기 슬롯 오픈 완료 - " + $"메인 Active={CountActive(mainQuests)}, " + @@ -69,11 +70,22 @@ private QuestData CloneQuest(QuestData src) dst.conditionTexts = src.conditionTexts != null ? (string[])src.conditionTexts.Clone() : null; dst.targetCounts = src.targetCounts != null ? (int[])src.targetCounts.Clone() : null; + // ⭐ 추가: 추적용 조건 정보 복사 + dst.conditionTypes = src.conditionTypes != null ? (QuestConditionType[])src.conditionTypes.Clone() : null; + dst.conditionItems = src.conditionItems != null ? (ItemData[])src.conditionItems.Clone() : null; + dst.countByAmount = src.countByAmount != null ? (bool[])src.countByAmount.Clone() : null; + + // ⭐ currentCounts도 src에 저장된 값이 있다면 복사(없으면 0으로 새로) + if (src.currentCounts != null && src.currentCounts.Length > 0) + dst.currentCounts = (int[])src.currentCounts.Clone(); + else + dst.currentCounts = (dst.targetCounts != null) ? new int[dst.targetCounts.Length] : null; + // 런타임 상태(새로 생성) dst.state = src.state; // 혹은 Locked로 통일해도 됨(InitializeQuestStates가 어차피 초기화) dst.currentCount = src.currentCount; dst.rewardClaimed = src.rewardClaimed; - dst.currentCounts = (dst.targetCounts != null) ? new int[dst.targetCounts.Length] : null; + //dst.currentCounts = (dst.targetCounts != null) ? new int[dst.targetCounts.Length] : null; // 보상/체인 dst.rewardKey = src.rewardKey; @@ -155,10 +167,18 @@ private void InitializeQuestStates() continue; } - q.state = QuestState.Locked; + //q.state = QuestState.Locked; + + EnsureConditionArrays(q); + if (q.currentCounts != null) + { + for (int i = 0; i < q.currentCounts.Length; i++) + q.currentCounts[i] = 0; + } q.currentCount = 0; - q.rewardClaimed = false; + q.rewardClaimed = false; // 세이브 시스템 후 수정 필요 q.isNewlyOpened = false; + } } @@ -268,6 +288,7 @@ public void LoadQuestData(List savedQuests) // 상태가 변경되었으니 슬롯 갱신 시도 OpenInitialSlots(); + RebuildActiveConditionIndex(); Debug.Log("퀘스트 상태 복구 완료"); } public event Action OnQuestChanged; @@ -322,6 +343,7 @@ public bool ClaimRewardMainSub(QuestData quest) // 퀘스트 상태 변경: Closed quest.rewardClaimed = true; quest.state = QuestState.Closed; + RebuildActiveConditionIndex(); // 퀘스트 닫힌 뒤 다음 슬롯 자동 오픈 if (quest.type == QuestType.Main) @@ -401,4 +423,177 @@ public bool ClaimRewardDaily(QuestData quest) return true; } + // [유틸] 퀘스트 조건 배열(Types/Items/Counts)의 null/길이 불일치 방지. + // targetCounts 길이를 기준으로 currentCounts/conditionTypes/conditionItems/countByAmount를 자동 보정한다. + private void EnsureConditionArrays(QuestData q) + { + if (q == null) return; + + int n = (q.targetCounts != null) ? q.targetCounts.Length : 0; + if (n <= 0) return; + + if (q.currentCounts == null || q.currentCounts.Length != n) q.currentCounts = new int[n]; + if (q.conditionTypes == null || q.conditionTypes.Length != n) q.conditionTypes = new QuestConditionType[n]; + if (q.conditionItems == null || q.conditionItems.Length != n) q.conditionItems = new ItemData[n]; + if (q.countByAmount == null || q.countByAmount.Length != n) q.countByAmount = new bool[n]; + + if (n == 1) q.currentCount = q.currentCounts[0]; // 레거시 동기화(옵션) + } + + private class ConditionBinding + { + public QuestData quest; + public int index; + } + + private readonly Dictionary> _activeBindings + = new Dictionary>(); + + private int _evolveSuccessStreak = 0; + + // 인덱스 리빌드 함수 + private void RebuildActiveConditionIndex() + { + _activeBindings.Clear(); + + foreach (var q in allQuestList) + { + if (q == null) continue; + + EnsureConditionArrays(q); + + if (q.state != QuestState.Active) continue; + + for (int i = 0; i < q.conditionTypes.Length; i++) + { + var type = q.conditionTypes[i]; + if (type == QuestConditionType.None) continue; + + if (!_activeBindings.TryGetValue(type, out var list)) + { + list = new List(); + _activeBindings[type] = list; + } + + list.Add(new ConditionBinding { quest = q, index = i }); + } + } + } + + // 퀘스트 진행도 추적 - 알림 함수 ! + public void NotifyAction(QuestConditionType type, ItemData item = null, int amount = 1) + { + if (!_activeBindings.TryGetValue(type, out var list) || list == null || list.Count == 0) + return; + + bool changedAny = false; + + foreach (var b in list) + { + var q = b.quest; + int i = b.index; + + if (q == null || q.state != QuestState.Active) continue; + EnsureConditionArrays(q); + + // 아이템 필터(조건에 특정 아이템이 지정된 경우만) + ItemData required = q.conditionItems[i]; + if (required != null && item != required) continue; + + int target = q.targetCounts[i]; + int before = q.currentCounts[i]; + + // countByAmount: true면 amount 만큼 증가(개수/금액), false면 1회로 증가 + int delta = q.countByAmount[i] ? Mathf.Max(0, amount) : 1; + + int after = Mathf.Clamp(before + delta, 0, target); + + if (after != before) + { + q.currentCounts[i] = after; + if (q.targetCounts.Length == 1) q.currentCount = q.currentCounts[0]; + changedAny = true; + } + + if (IsCompletedByCounts(q) && q.state == QuestState.Active) + { + q.state = QuestState.Completed; + changedAny = true; + } + } + + if (changedAny) + OnQuestChanged?.Invoke(); + } + + // 진화 결과 추적용 함수 + public void NotifyEvolutionResult(bool success, ItemData resultItem = null) + { + Debug.Log($"[Quest<-Lab] NotifyEvolutionResult RECEIVED. success={success}, item={(resultItem != null ? resultItem.itemName : "null")}"); + + if (success) + { + _evolveSuccessStreak++; + NotifyAction(QuestConditionType.EvolveSuccess, resultItem, 1); + + // 5연속 성공 타입은 '스트릭 값'으로 + if (_activeBindings.TryGetValue(QuestConditionType.EvolveSuccessStreak, out var list)) + { + bool changed = false; + + foreach (var b in list) + { + var q = b.quest; + int i = b.index; + if (q == null || q.state != QuestState.Active) continue; + + EnsureConditionArrays(q); + + int target = q.targetCounts[i]; + int newValue = Mathf.Clamp(_evolveSuccessStreak, 0, target); + + if (q.currentCounts[i] != newValue) + { + q.currentCounts[i] = newValue; + changed = true; + } + + if (IsCompletedByCounts(q) && q.state == QuestState.Active) + { + q.state = QuestState.Completed; + changed = true; + } + } + + if (changed) OnQuestChanged?.Invoke(); + } + } + else + { + _evolveSuccessStreak = 0; + NotifyAction(QuestConditionType.EvolveFail, null, 1); + + // 실패하면 연속 성공 스트릭이 0 + if (_activeBindings.TryGetValue(QuestConditionType.EvolveSuccessStreak, out var list)) + { + bool changed = false; + foreach (var b in list) + { + var q = b.quest; + int i = b.index; + if (q == null || q.state != QuestState.Active) continue; + + EnsureConditionArrays(q); + + if (q.currentCounts[i] != 0) + { + q.currentCounts[i] = 0; + changed = true; + } + } + if (changed) OnQuestChanged?.Invoke(); + } + } + } + } diff --git a/Assets/Scripts/ResearchLab.cs b/Assets/Scripts/ResearchLab.cs index 56af32f..3854b57 100644 --- a/Assets/Scripts/ResearchLab.cs +++ b/Assets/Scripts/ResearchLab.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; +using TMPro; using UnityEngine; using UnityEngine.UI; -using TMPro; [System.Serializable] public class CategoryTab @@ -213,13 +213,22 @@ public void OnConfirmEvolution() InventoryManager.Instance.AddItem(newItem, 1); SoundManager.Instance.PlaySFX("ev_success"); OpenSuccessPopup(newItem); + + // 퀘스트 진행도 : 진화 성공/연속성공 + Debug.Log($"[Lab->Quest] Evolve SUCCESS send. result={newItem.itemName}"); + QuestManager.Instance?.NotifyEvolutionResult(true, newItem); + } else { UIManager.Instance.ShowAlertPopup("아무런 반응이 없습니다...\n 재료가 모두 사라졌습니다."); SoundManager.Instance.PlaySFX("ev_fail"); + + Debug.Log("[Lab->Quest] Evolve FAIL send."); + QuestManager.Instance?.NotifyEvolutionResult(false, null); } + pendingRecipe = null; currentEvolutionCost = 0; } diff --git a/Assets/Scripts/UI/InventoryUI.cs b/Assets/Scripts/UI/InventoryUI.cs index ed4e2f9..69f45cc 100644 --- a/Assets/Scripts/UI/InventoryUI.cs +++ b/Assets/Scripts/UI/InventoryUI.cs @@ -233,6 +233,9 @@ public void OnRealSellClick() InventoryManager.Instance.RemoveItem(selectedItem, currentSellQuantity); PoingManager.Instance.IncreasePoing(totalPrice); + // 퀘스트 진행도 : 판매 + QuestManager.Instance?.NotifyAction(QuestConditionType.SellItem, selectedItem, currentSellQuantity); + UIManager.Instance.ShowAlertPopup($"판매 완료! (+{totalPrice} 포잉)"); SoundManager.Instance.PlaySFX("button"); diff --git a/Assets/Scripts/UI/StoreUI.cs b/Assets/Scripts/UI/StoreUI.cs index f3f27ea..bf76a7d 100644 --- a/Assets/Scripts/UI/StoreUI.cs +++ b/Assets/Scripts/UI/StoreUI.cs @@ -308,6 +308,9 @@ public void OnRealPurchaseClick() PoingManager.Instance.DecreasePoing(totalCost); InventoryManager.Instance.AddItem(selectedItem, currentBuyQuantity); + // 퀘스트 진행도 : 구매 (종류별로 분기) + NotifyPurchaseToQuest(selectedItem, currentBuyQuantity); + UIManager.Instance.ShowAlertPopup($"{selectedItem.itemName} {currentBuyQuantity}개 구매 완료!"); CloseBuyPopup(); @@ -326,4 +329,34 @@ public void CloseBuyPopup() if (buyPopupObject != null) buyPopupObject.SetActive(false); SoundManager.Instance.PlaySFX("Button"); } + + // 퀘스트 진행도 : 구매 종류 구별 함수 + private void NotifyPurchaseToQuest(ItemData item, int quantity) + { + if (QuestManager.Instance == null || item == null) return; + + switch (item.itemCategory) + { + case "Seed": + QuestManager.Instance.NotifyAction(QuestConditionType.BuySeed, item, quantity); + break; + + case "Potion": + QuestManager.Instance.NotifyAction(QuestConditionType.BuyPotion, item, quantity); + break; + + case "Tool": + QuestManager.Instance.NotifyAction(QuestConditionType.BuyTool, item, quantity); + break; + + case "Theme": + QuestManager.Instance.NotifyAction(QuestConditionType.BuyTheme, item, quantity); + break; + + default: + // 필요 시 카테고리 추가 + break; + } + } + } \ No newline at end of file From 2b08274ad693f9531f422a0f9a8cf759a516a5fa Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Wed, 7 Jan 2026 14:43:41 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=EC=A7=84=ED=96=89=EB=8F=84=20=EC=B6=94?= =?UTF-8?q?=EC=A0=81:=20=EC=A7=84=ED=99=94=20=EC=84=B1=EA=B3=B5/=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8,=20=EC=95=84=EC=9D=B4=ED=85=9C=20=EA=B5=AC=EB=A7=A4/?= =?UTF-8?q?=ED=8C=90=EB=A7=A4=20check=20~=20ui=20=EB=AF=B8=EB=B0=98?= =?UTF-8?q?=EC=98=81=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0=20=ED=95=84?= =?UTF-8?q?=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/QuestSystem/QuestManager.cs | 6 ++++-- Assets/Scripts/ResearchLab.cs | 3 +-- Assets/Scripts/UI/StoreUI.cs | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/QuestSystem/QuestManager.cs b/Assets/Scripts/QuestSystem/QuestManager.cs index 29319fe..89cfd18 100644 --- a/Assets/Scripts/QuestSystem/QuestManager.cs +++ b/Assets/Scripts/QuestSystem/QuestManager.cs @@ -480,9 +480,11 @@ private void RebuildActiveConditionIndex() } } - // 퀘스트 진행도 추적 - 알림 함수 ! + // ✨ 퀘스트 진행도 추적 - 알림 함수 ! public void NotifyAction(QuestConditionType type, ItemData item = null, int amount = 1) { + Debug.Log($"[Quest][Action][RECV] type={type} item={(item != null ? item.itemName : "null")} amount={amount}"); + if (!_activeBindings.TryGetValue(type, out var list) || list == null || list.Count == 0) return; @@ -529,7 +531,7 @@ public void NotifyAction(QuestConditionType type, ItemData item = null, int amou // 진화 결과 추적용 함수 public void NotifyEvolutionResult(bool success, ItemData resultItem = null) { - Debug.Log($"[Quest<-Lab] NotifyEvolutionResult RECEIVED. success={success}, item={(resultItem != null ? resultItem.itemName : "null")}"); + //Debug.Log($"[Quest<-Lab] NotifyEvolutionResult RECEIVED. success={success}, item={(resultItem != null ? resultItem.itemName : "null")}"); if (success) { diff --git a/Assets/Scripts/ResearchLab.cs b/Assets/Scripts/ResearchLab.cs index 3854b57..4badb05 100644 --- a/Assets/Scripts/ResearchLab.cs +++ b/Assets/Scripts/ResearchLab.cs @@ -215,7 +215,6 @@ public void OnConfirmEvolution() OpenSuccessPopup(newItem); // 퀘스트 진행도 : 진화 성공/연속성공 - Debug.Log($"[Lab->Quest] Evolve SUCCESS send. result={newItem.itemName}"); QuestManager.Instance?.NotifyEvolutionResult(true, newItem); } @@ -224,7 +223,7 @@ public void OnConfirmEvolution() UIManager.Instance.ShowAlertPopup("아무런 반응이 없습니다...\n 재료가 모두 사라졌습니다."); SoundManager.Instance.PlaySFX("ev_fail"); - Debug.Log("[Lab->Quest] Evolve FAIL send."); + // 퀘스트 진행도 : 진화 실패 QuestManager.Instance?.NotifyEvolutionResult(false, null); } diff --git a/Assets/Scripts/UI/StoreUI.cs b/Assets/Scripts/UI/StoreUI.cs index bf76a7d..1bb27eb 100644 --- a/Assets/Scripts/UI/StoreUI.cs +++ b/Assets/Scripts/UI/StoreUI.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; +using TMPro; using UnityEngine; using UnityEngine.UI; -using TMPro; public class StoreUI : MonoBehaviour { @@ -354,9 +354,10 @@ private void NotifyPurchaseToQuest(ItemData item, int quantity) break; default: - // 필요 시 카테고리 추가 break; } } + + } \ No newline at end of file From 73343ab986de4604e798a69eef5601fbdfc41470 Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Wed, 7 Jan 2026 16:09:18 +0900 Subject: [PATCH 4/6] =?UTF-8?q?Asset=20database=20-=20=EB=A9=94=EC=9D=B8,?= =?UTF-8?q?=20=EC=84=9C=EB=B8=8C=20=ED=80=98=EC=8A=A4=ED=8A=B8=EB=B3=84=20?= =?UTF-8?q?=EB=AF=B8=EC=85=98=20=ED=83=80=EC=9E=85=20=EB=84=A3=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Data/Quests/QuestDatabase.asset | 138 ++++++++++++++++++--- Assets/Scripts/QuestSystem/QuestManager.cs | 21 +++- Assets/Scripts/UI/InventoryUI.cs | 13 +- 3 files changed, 152 insertions(+), 20 deletions(-) diff --git a/Assets/Data/Quests/QuestDatabase.asset b/Assets/Data/Quests/QuestDatabase.asset index bf4eaa0..8adac1f 100644 --- a/Assets/Data/Quests/QuestDatabase.asset +++ b/Assets/Data/Quests/QuestDatabase.asset @@ -25,11 +25,17 @@ MonoBehaviour: state: 3 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uAC10\uC790 5\uAC1C \uD310\uB9E4\uD558\uAE30" - "\uB3C4\uB9DD\uAC10\uC790 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0500000001000000 - currentCounts: + currentCounts: 0000000000000000 + conditionTypes: 0400000009000000 + conditionItems: + - {fileID: 11400000, guid: 48d7f29a3bd99d842b1450283f0823e4, type: 2} + - {fileID: 11400000, guid: 2d77699aea346e14bad47554c5b37023, type: 2} + countByAmount: 0101 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -52,11 +58,17 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uD1A0\uB9C8\uD1A0 5\uAC1C \uC218\uD655\uD558\uAE30" - "\uBA4B\uC7C1\uC774 \uD1A0\uB9C8\uD1A0 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0500000001000000 - currentCounts: + currentCounts: 0000000000000000 + conditionTypes: 0200000009000000 + conditionItems: + - {fileID: 11400000, guid: 0189d90933e11354faf6ba4ffb34e421, type: 2} + - {fileID: 11400000, guid: 5f77868eb7ff7124292b829eeab8d705, type: 2} + countByAmount: 0101 rewardItem: {fileID: 11400000, guid: 165382755a2f6684cb91d6ee842877eb, type: 2} rewardKey: 0 rewardAmount: 1 @@ -80,11 +92,17 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uB9C8\uB298 3\uAC1C \uC2EC\uAE30" - "\uC54C\uB9AC\uC624\uC62C\uB9AC\uC624 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0300000001000000 - currentCounts: + currentCounts: 0000000000000000 + conditionTypes: 0100000009000000 + conditionItems: + - {fileID: 11400000, guid: c750a806cdddfa54db1a5ac00afb8b69, type: 2} + - {fileID: 11400000, guid: 10faf0077e11050498008c4e07d3d020, type: 2} + countByAmount: 0101 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -105,11 +123,17 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uBA54\uB860 3\uAC1C \uD310\uB9E4\uD558\uAE30" - "\uBA54\uB85C\uB098 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0300000001000000 currentCounts: 0000000000000000 + conditionTypes: 0400000009000000 + conditionItems: + - {fileID: 11400000, guid: cdd542ae1919f9743a54088d6e19a46a, type: 2} + - {fileID: 11400000, guid: 85bcbe743956b524f9a280b790a85b6d, type: 2} + countByAmount: 0101 rewardItem: {fileID: 11400000, guid: 2f7f40b2408e9a14fbdb500f84d2c07e, type: 2} rewardKey: 0 rewardAmount: 1 @@ -134,11 +158,17 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uD638\uBC15 1\uAC1C \uC218\uD655\uD558\uAE30" - "\uC7AD\uC624\uB79C\uD134 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0100000001000000 - currentCounts: + currentCounts: 0000000000000000 + conditionTypes: 0200000009000000 + conditionItems: + - {fileID: 11400000, guid: 3f9d23aa25892e846baf2ccdbd7a371e, type: 2} + - {fileID: 11400000, guid: 70aaa14332b73d041afd5bf727cdb3cd, type: 2} + countByAmount: 0101 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -163,11 +193,17 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uC0AC\uD0D5\uC218\uC218 1\uAC1C \uC2EC\uAE30" - "\uBCC4\uC0AC\uD0D5 \uC9C4\uD654\uC2DC\uD0A4\uAE30" targetCounts: 0100000001000000 - currentCounts: + currentCounts: 0000000000000000 + conditionTypes: 0100000009000000 + conditionItems: + - {fileID: 11400000, guid: 45a83d0d29381c64da960d03d796908f, type: 2} + - {fileID: 11400000, guid: cfb522275ce02bf47af1e608e6d2281f, type: 2} + countByAmount: 0101 rewardItem: {fileID: 11400000, guid: 9f6b5ecc7de7da94aae4f15b60e19f5d, type: 2} rewardKey: 0 rewardAmount: 1 @@ -189,10 +225,15 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uC791\uBB3C \uC528\uC557 10\uAC1C \uAD6C\uB9E4\uD558\uAE30" targetCounts: 0a000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 05000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: 78430ef49a53a804bbdec4d89d7d0962, type: 2} rewardKey: 0 rewardAmount: 1 @@ -213,10 +254,15 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uC218\uD655\uB3C4\uAD6C 1\uAC1C \uAD6C\uB9E4\uD558\uAE30" targetCounts: 01000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 07000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: c750a806cdddfa54db1a5ac00afb8b69, type: 2} rewardKey: 0 rewardAmount: 1 @@ -238,10 +284,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uC791\uBB3C 50\uAC1C \uD310\uB9E4\uD558\uAE30" targetCounts: 32000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 04000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: 4eeadc65370f02c42bb3f879f533e9ab, type: 2} rewardKey: 0 rewardAmount: 1 @@ -262,10 +313,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "7\uC77C \uC5F0\uC18D \uC811\uC18D\uD558\uAE30" targetCounts: 07000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 00000000 + conditionItems: + - {fileID: 0} + countByAmount: 00 rewardItem: {fileID: 11400000, guid: cf50d8519e8d7564cb4a5e8007ce4d50, type: 2} rewardKey: 0 rewardAmount: 1 @@ -286,10 +342,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uAFB8\uBBF8\uAE30\uD14C\uB9C8 1\uAC1C \uAD6C\uB9E4\uD558\uAE30" targetCounts: 01000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 08000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: 69d52f45f3dbce046a0667d4a6f36275, type: 2} rewardKey: 0 rewardAmount: 1 @@ -310,10 +371,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "5\uB9CC \uACE8\uB4DC \uC18C\uBE44\uD558\uAE30" targetCounts: 50c30000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 0c000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: 45a83d0d29381c64da960d03d796908f, type: 2} rewardKey: 0 rewardAmount: 1 @@ -334,10 +400,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - "\uC791\uBB3C \uC9C4\uD654 5\uC5F0\uC18D \uC131\uACF5\uD558\uAE30" targetCounts: 05000000 - currentCounts: + currentCounts: 00000000 + conditionTypes: 0b000000 + conditionItems: + - {fileID: 0} + countByAmount: 00 rewardItem: {fileID: 11400000, guid: 7f042aa655193ce4bb50c74cbb64d5a2, type: 2} rewardKey: 0 rewardAmount: 1 @@ -359,10 +430,15 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: - - "\uC544\uC2A4\uD30C\uB77C\uAC70\uC2A4 1\uC2DC\uAC04 \uC548\uC5D0 \uC218\uD655\uD558\uAE30" - targetCounts: 00000000 - currentCounts: + - "\uC544\uC2A4\uD30C\uB77C\uAC70\uC2A4 1\uAC1C \uC218\uD655\uD558\uAE30" + targetCounts: 01000000 + currentCounts: 00000000 + conditionTypes: 02000000 + conditionItems: + - {fileID: 11400000, guid: d610bf3fa42cdad42b18e4b755464ac4, type: 2} + countByAmount: 01 rewardItem: {fileID: 11400000, guid: 7abee0038aca19a4ca280f408482bb11, type: 2} rewardKey: 0 rewardAmount: 1 @@ -380,9 +456,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -400,9 +480,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -420,9 +504,13 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -440,9 +528,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -460,9 +552,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -480,9 +576,13 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -500,9 +600,13 @@ MonoBehaviour: state: 1 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -520,9 +624,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 diff --git a/Assets/Scripts/QuestSystem/QuestManager.cs b/Assets/Scripts/QuestSystem/QuestManager.cs index 89cfd18..e0491d9 100644 --- a/Assets/Scripts/QuestSystem/QuestManager.cs +++ b/Assets/Scripts/QuestSystem/QuestManager.cs @@ -454,6 +454,8 @@ private readonly Dictionary> _activeB // 인덱스 리빌드 함수 private void RebuildActiveConditionIndex() { + Debug.Log("[Quest][Bind] RebuildActiveConditionIndex() CALLED"); + _activeBindings.Clear(); foreach (var q in allQuestList) @@ -478,6 +480,10 @@ private void RebuildActiveConditionIndex() list.Add(new ConditionBinding { quest = q, index = i }); } } + + Debug.Log($"[Quest][Bind] rebuilt. types={_activeBindings.Count}"); + foreach (var kv in _activeBindings) Debug.Log($"[Quest][Bind] type={kv.Key} bindings={kv.Value.Count}"); + } // ✨ 퀘스트 진행도 추적 - 알림 함수 ! @@ -486,7 +492,10 @@ public void NotifyAction(QuestConditionType type, ItemData item = null, int amou Debug.Log($"[Quest][Action][RECV] type={type} item={(item != null ? item.itemName : "null")} amount={amount}"); if (!_activeBindings.TryGetValue(type, out var list) || list == null || list.Count == 0) + { + Debug.Log($"[Quest][Action][DROP] type={type} (no active binding)"); return; + } bool changedAny = false; @@ -500,7 +509,11 @@ public void NotifyAction(QuestConditionType type, ItemData item = null, int amou // 아이템 필터(조건에 특정 아이템이 지정된 경우만) ItemData required = q.conditionItems[i]; - if (required != null && item != required) continue; + if (required != null && item != required) + { + Debug.Log($"[Quest][Action][SKIP] type={type} required={required.itemName} got={(item != null ? item.itemName : "null")}"); + continue; + } int target = q.targetCounts[i]; int before = q.currentCounts[i]; @@ -515,6 +528,8 @@ public void NotifyAction(QuestConditionType type, ItemData item = null, int amou q.currentCounts[i] = after; if (q.targetCounts.Length == 1) q.currentCount = q.currentCounts[0]; changedAny = true; + + Debug.Log($"[Quest][Action][APPLY] quest={q.key} idx={i} {before}->{after}/{target} delta={delta}"); } if (IsCompletedByCounts(q) && q.state == QuestState.Active) @@ -528,10 +543,10 @@ public void NotifyAction(QuestConditionType type, ItemData item = null, int amou OnQuestChanged?.Invoke(); } - // 진화 결과 추적용 함수 + // 진화 결과 추적용 함수 (연속 횟수) public void NotifyEvolutionResult(bool success, ItemData resultItem = null) { - //Debug.Log($"[Quest<-Lab] NotifyEvolutionResult RECEIVED. success={success}, item={(resultItem != null ? resultItem.itemName : "null")}"); + Debug.Log($"[Quest<-Lab] NotifyEvolutionResult RECEIVED. success={success}, item={(resultItem != null ? resultItem.itemName : "null")}"); if (success) { diff --git a/Assets/Scripts/UI/InventoryUI.cs b/Assets/Scripts/UI/InventoryUI.cs index 69f45cc..de27a40 100644 --- a/Assets/Scripts/UI/InventoryUI.cs +++ b/Assets/Scripts/UI/InventoryUI.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; +using System.Diagnostics; +using TMPro; using UnityEngine; using UnityEngine.UI; -using TMPro; public class InventoryUI : MonoBehaviour { @@ -234,7 +235,15 @@ public void OnRealSellClick() PoingManager.Instance.IncreasePoing(totalPrice); // 퀘스트 진행도 : 판매 - QuestManager.Instance?.NotifyAction(QuestConditionType.SellItem, selectedItem, currentSellQuantity); + if (QuestManager.Instance != null && selectedItem != null) + { + // 작물만 카운트 + if (selectedItem.itemCategory == "Crop") + { + QuestManager.Instance.NotifyAction(QuestConditionType.SellItem, selectedItem, sellQuantity); + } + } + UIManager.Instance.ShowAlertPopup($"판매 완료! (+{totalPrice} 포잉)"); SoundManager.Instance.PlaySFX("button"); From 206901dc2de03069e85f4643f24cb1c6d45ff5fd Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Sat, 10 Jan 2026 19:16:46 +0900 Subject: [PATCH 5/6] =?UTF-8?q?asset=20database=20-=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=20=EC=9E=A1=EA=B8=B0=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Data/Quests/QuestDatabase.asset | 56 +++++++++++++++----------- Assets/Scripts/UI/InventoryUI.cs | 4 +- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/Assets/Data/Quests/QuestDatabase.asset b/Assets/Data/Quests/QuestDatabase.asset index 8adac1f..9c8fc5e 100644 --- a/Assets/Data/Quests/QuestDatabase.asset +++ b/Assets/Data/Quests/QuestDatabase.asset @@ -460,9 +460,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 01000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -484,9 +485,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 02000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -508,9 +510,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 04000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -532,9 +535,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 09000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -556,9 +560,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 0a000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -580,9 +585,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 03000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -604,9 +610,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 05000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -628,9 +635,10 @@ MonoBehaviour: conditionTexts: [] targetCounts: currentCounts: - conditionTypes: - conditionItems: [] - countByAmount: + conditionTypes: 06000000 + conditionItems: + - {fileID: 0} + countByAmount: 01 rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 diff --git a/Assets/Scripts/UI/InventoryUI.cs b/Assets/Scripts/UI/InventoryUI.cs index de27a40..1d128d3 100644 --- a/Assets/Scripts/UI/InventoryUI.cs +++ b/Assets/Scripts/UI/InventoryUI.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Diagnostics; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -240,11 +239,10 @@ public void OnRealSellClick() // 작물만 카운트 if (selectedItem.itemCategory == "Crop") { - QuestManager.Instance.NotifyAction(QuestConditionType.SellItem, selectedItem, sellQuantity); + QuestManager.Instance.NotifyAction(QuestConditionType.SellItem, selectedItem, currentSellQuantity); } } - UIManager.Instance.ShowAlertPopup($"판매 완료! (+{totalPrice} 포잉)"); SoundManager.Instance.PlaySFX("button"); From d17c9d48aecd21460205e26f69e15942f9fef18a Mon Sep 17 00:00:00 2001 From: chaeyeon-jung Date: Sun, 11 Jan 2026 10:30:18 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=ED=80=98=EC=8A=A4=ED=8A=B8=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=EB=8F=84=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20-=20field=20?= =?UTF-8?q?check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Main.unity | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 19d8538..373dc97 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -21042,7 +21042,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1391117631053140965, guid: 919d9adfd0fce4b8a8931c6fb8402cc9, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3598634383605731546, guid: 919d9adfd0fce4b8a8931c6fb8402cc9, type: 3} propertyPath: m_fontSize @@ -45328,9 +45328,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -45348,9 +45352,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -45368,9 +45376,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -45388,9 +45400,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -45408,9 +45424,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0 @@ -45428,9 +45448,13 @@ MonoBehaviour: state: 0 currentCount: 0 rewardClaimed: 0 + isNewlyOpened: 0 conditionTexts: [] targetCounts: currentCounts: + conditionTypes: + conditionItems: [] + countByAmount: rewardItem: {fileID: 0} rewardKey: 0 rewardAmount: 0