diff --git a/Assets/Prefabs/Managers/PlayerHUD.prefab b/Assets/Prefabs/Managers/PlayerHUD.prefab
index 1c1b01fd..17e73cfc 100644
--- a/Assets/Prefabs/Managers/PlayerHUD.prefab
+++ b/Assets/Prefabs/Managers/PlayerHUD.prefab
@@ -1168,6 +1168,7 @@ MonoBehaviour:
eagleEye: {fileID: 8093509920149135307}
ramaSjangButton: {fileID: 4599222264323240281}
scrabBookButton: {fileID: 2880351836456325619}
+ pauseButton: {fileID: 4413855344712201574}
cinematicSprites: {fileID: 0}
cinematicBackgroundSprites: {fileID: 0}
currentCinematicPlayer: {fileID: 0}
diff --git a/Assets/Scenes/MiniGames/StatueDecoration.unity b/Assets/Scenes/MiniGames/StatueDecoration.unity
index f2659de5..402ecfdc 100644
--- a/Assets/Scenes/MiniGames/StatueDecoration.unity
+++ b/Assets/Scenes/MiniGames/StatueDecoration.unity
@@ -2173,6 +2173,7 @@ RectTransform:
- {fileID: 1443594949}
- {fileID: 61401516}
- {fileID: 1678978}
+ - {fileID: 1758487248}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -2888,6 +2889,139 @@ MonoBehaviour:
m_Spacing: {x: 50, y: 50}
m_Constraint: 1
m_ConstraintCount: 3
+--- !u!1 &1758487247
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1758487248}
+ - component: {fileID: 1758487251}
+ - component: {fileID: 1758487250}
+ - component: {fileID: 1758487249}
+ m_Layer: 5
+ m_Name: Button
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1758487248
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1758487247}
+ 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: 1217454518}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 1, y: 1}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: -75, y: -75}
+ m_SizeDelta: {x: 150, y: 150}
+ m_Pivot: {x: 1, y: 1}
+--- !u!114 &1758487249
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1758487247}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 1758487250}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 1647993458}
+ m_TargetAssemblyTypeName: Minigames.StatueDressup.Controllers.StatueDecorationController,
+ AppleHillsScripts
+ m_MethodName: ExitToAppleHills
+ m_Mode: 1
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 2
+--- !u!114 &1758487250
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1758487247}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 607773040016097035, guid: ee014bd71cac2bc4ab845f435726f383, 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!222 &1758487251
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1758487247}
+ m_CullTransparentMesh: 1
--- !u!1 &1774956262
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Scripts/Minigames/StatueDressup/Controllers/DecorationMenuController.cs b/Assets/Scripts/Minigames/StatueDressup/Controllers/DecorationMenuController.cs
index df8285a5..130de96f 100644
--- a/Assets/Scripts/Minigames/StatueDressup/Controllers/DecorationMenuController.cs
+++ b/Assets/Scripts/Minigames/StatueDressup/Controllers/DecorationMenuController.cs
@@ -49,6 +49,12 @@ namespace Minigames.StatueDressup.Controllers
{
Logging.Error("[DecorationMenuController] Failed to load StatueDressupSettings!");
}
+
+ // Ensure outline starts hidden (do this early so it's ready for saved decorations)
+ if (statueOutline != null)
+ {
+ statueOutline.gameObject.SetActive(false);
+ }
}
///
@@ -64,12 +70,6 @@ namespace Minigames.StatueDressup.Controllers
return;
}
- // Ensure outline starts hidden
- if (statueOutline != null)
- {
- statueOutline.gameObject.SetActive(false);
- }
-
var allDecorations = _settings.AllDecorations;
int itemsPerPage = _settings.ItemsPerPage;
@@ -185,14 +185,16 @@ namespace Minigames.StatueDressup.Controllers
// Get outline RectTransform for overlap detection
RectTransform outlineRect = statueOutline != null ? statueOutline.rectTransform : null;
- // Initialize with references
+ // Initialize with references including outline callbacks
instance.Initialize(
data,
outlineRect,
statueController.StatueParent,
statueController,
_settings,
- OnDraggableFinished
+ OnDraggableFinished,
+ ShowStatueOutline, // Show outline when picking up from statue
+ HideStatueOutline // Hide outline when drag ends
);
// Position at cursor (in local space)
@@ -220,19 +222,24 @@ namespace Minigames.StatueDressup.Controllers
///
/// Show the statue outline to indicate valid drop area
///
- private void ShowStatueOutline()
+ public void ShowStatueOutline()
{
+ Logging.Debug($"[DecorationMenuController] ShowStatueOutline called - statueOutline is null: {statueOutline == null}");
if (statueOutline != null)
{
statueOutline.gameObject.SetActive(true);
Logging.Debug("[DecorationMenuController] Statue outline shown");
}
+ else
+ {
+ Logging.Warning("[DecorationMenuController] Cannot show outline - statueOutline is null!");
+ }
}
///
/// Hide the statue outline after drag ends
///
- private void HideStatueOutline()
+ public void HideStatueOutline()
{
if (statueOutline != null)
{
diff --git a/Assets/Scripts/Minigames/StatueDressup/Controllers/StatueDecorationController.cs b/Assets/Scripts/Minigames/StatueDressup/Controllers/StatueDecorationController.cs
index 1c6ab4ed..57d357d3 100644
--- a/Assets/Scripts/Minigames/StatueDressup/Controllers/StatueDecorationController.cs
+++ b/Assets/Scripts/Minigames/StatueDressup/Controllers/StatueDecorationController.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using Core;
using Core.Lifecycle;
using Minigames.StatueDressup.Data;
@@ -420,11 +421,25 @@ namespace Minigames.StatueDressup.Controllers
// Spawn decoration instance
DecorationDraggableInstance instance = Instantiate(draggablePrefab, statueParent);
+ // Get canvas parent for drag context (used when picking up)
+ Transform canvasParent = statueParent.parent; // Typically the canvas or draggable container
+
+ // Create callbacks for outline show/hide
+ Logging.Debug($"[StatueDecorationController] MenuController is null: {menuController == null}");
+ System.Action showOutlineCallback = menuController != null ? (System.Action)menuController.ShowStatueOutline : null;
+ System.Action hideOutlineCallback = menuController != null ? (System.Action)menuController.HideStatueOutline : null;
+ Logging.Debug($"[StatueDecorationController] Show outline callback is null: {showOutlineCallback == null}");
+
// Initialize in "placed" state (skip drag logic)
instance.InitializeAsPlaced(
decorationData,
this,
- _settings
+ _settings,
+ statueArea, // Pass statue outline for overlap detection
+ canvasParent, // Pass canvas parent for reparenting during pickup
+ showOutlineCallback, // Show outline when picking up
+ hideOutlineCallback, // Hide outline when drag ends
+ hideOutlineCallback // Also use hide callback for onFinished
);
// Apply saved transform
@@ -480,6 +495,13 @@ namespace Minigames.StatueDressup.Controllers
// openGalleryButton.onClick.RemoveListener(OnOpenGallery);
// }
}
+
+ public async void ExitToAppleHills()
+ {
+ // Replace with the actual scene name as set in Build Settings
+ var progress = new Progress(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
+ await SceneManagerService.Instance.SwitchSceneAsync("AppleHillsOverworld", progress);
+ }
}
}
diff --git a/Assets/Scripts/Minigames/StatueDressup/DragDrop/DecorationDraggableInstance.cs b/Assets/Scripts/Minigames/StatueDressup/DragDrop/DecorationDraggableInstance.cs
index d6446961..b6470357 100644
--- a/Assets/Scripts/Minigames/StatueDressup/DragDrop/DecorationDraggableInstance.cs
+++ b/Assets/Scripts/Minigames/StatueDressup/DragDrop/DecorationDraggableInstance.cs
@@ -12,8 +12,9 @@ namespace Minigames.StatueDressup.DragDrop
/// Draggable instance of a decoration that can be placed on the statue.
/// Created dynamically when dragging from menu or picking up from statue.
/// Destroyed if dropped outside statue area.
+ /// Supports tapping and dragging when placed on statue.
///
- public class DecorationDraggableInstance : MonoBehaviour
+ public class DecorationDraggableInstance : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler
{
[Header("References")]
[SerializeField] private Image decorationImage;
@@ -22,15 +23,19 @@ namespace Minigames.StatueDressup.DragDrop
private DecorationData _decorationData;
private RectTransform _rectTransform;
private Canvas _canvas;
+ private Transform _canvasParent; // Parent transform for dragging (usually canvas or draggable container)
private RectTransform _statueOutline;
private Transform _statueParent;
private StatueDecorationController _controller;
private AppleHills.Core.Settings.IStatueDressupSettings _settings;
private System.Action _onFinishedCallback;
+ private System.Action _onShowOutlineCallback;
+ private System.Action _onHideOutlineCallback;
private bool _isDragging;
private bool _isPlacedOnStatue;
private Vector3 _dragOffset;
+ private bool _dragStarted; // Track if drag actually started (vs just a click)
// Properties
public DecorationData Data => _decorationData;
@@ -41,10 +46,22 @@ namespace Minigames.StatueDressup.DragDrop
_rectTransform = GetComponent();
_canvas = GetComponentInParent