diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_Big.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_Big.png index 7720f099..9b3e9f0a 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_Big.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_Big.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_small.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_small.png index c079b437..27ee88b5 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_small.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_Footer_small.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan.png index deec5130..12c4f38d 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan_logo.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan_logo.png index d57eed28..07506615 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan_logo.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_FryingPan_logo.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement.png index efc1c39d..fdefdfc0 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement_logo.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement_logo.png index 6a9d142a..e826c665 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement_logo.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_ProductManagement_logo.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing.png index 41ab6198..c9d132c2 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing_logo.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing_logo.png index 5a974917..cafc8b7a 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing_logo.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_Purchasing_logo.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn.png index 83f510fb..13d21eda 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn_logo.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn_logo.png index f3c75659..4cb73315 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn_logo.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_corn_logo.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop.png index d6cab44b..799eed58 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop_logo.png b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop_logo.png index 05c4d685..287daffd 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop_logo.png and b/popcorn/Assets/MyGame/Resource/UI/ui_button_icon_Footer_shop_logo.png differ diff --git a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab index 038c95f6..ee858f87 100644 --- a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab +++ b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab @@ -5624,6 +5624,7 @@ MonoBehaviour: rightPopcornTarget: {fileID: 8759972247495498057} frontPopcornTarget: {fileID: 2262857044639259982} wantFlavorSpriteTarget: {fileID: 4886416730275037410} + wantFlavorAmountText: {fileID: 364609804150918069} --- !u!114 &7213583640106143312 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity b/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity index 184a2908..3b57b8a7 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity +++ b/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity @@ -1088,10 +1088,15 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.x - value: -355.19922 + value: -375 objectReference: {fileID: 0} - target: {fileID: 3664916833752817997, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -1118,10 +1123,15 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.x - value: -535.10156 + value: -575 objectReference: {fileID: 0} - target: {fileID: 4348639590627783772, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -1140,8 +1150,8 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6969874152703327186, guid: caaa748dbeed576499e8cae74d33f689, type: 3} - propertyPath: m_AnchoredPosition.y - value: 260.69922 + propertyPath: m_LocalPosition.y + value: -843.2969 objectReference: {fileID: 0} - target: {fileID: 8103176713869808018, guid: caaa748dbeed576499e8cae74d33f689, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/Main/Main.unity b/popcorn/Assets/MyGame/Scenes/Main/Main.unity index 66debe9a..6c35ef35 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Main.unity +++ b/popcorn/Assets/MyGame/Scenes/Main/Main.unity @@ -5698,6 +5698,11 @@ PrefabInstance: propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -375 + objectReference: {fileID: 0} - target: {fileID: 3664916833780733955, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_Name @@ -5763,6 +5768,11 @@ PrefabInstance: propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -575 + objectReference: {fileID: 0} - target: {fileID: 3672624745086876516, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.y diff --git a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Footer.prefab b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Footer.prefab index e9c4c991..75ec44e3 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Footer.prefab +++ b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Footer.prefab @@ -34,8 +34,8 @@ RectTransform: 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: -23.199997} - m_SizeDelta: {x: 98, y: 38} + m_AnchoredPosition: {x: 0, y: -33.19998} + m_SizeDelta: {x: 161, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671340499624765 CanvasRenderer: @@ -108,8 +108,8 @@ RectTransform: 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: -23.2} - m_SizeDelta: {x: 98, y: 38} + m_AnchoredPosition: {x: 0, y: -33.19999} + m_SizeDelta: {x: 161, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671340824885727 CanvasRenderer: @@ -182,8 +182,8 @@ RectTransform: 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: 17.5} - m_SizeDelta: {x: 94, y: 76} + m_AnchoredPosition: {x: 0, y: 24} + m_SizeDelta: {x: 89, y: 95} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671340910471028 CanvasRenderer: @@ -256,8 +256,8 @@ RectTransform: 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: -23.2} - m_SizeDelta: {x: 98, y: 38} + m_AnchoredPosition: {x: 0, y: -33.19999} + m_SizeDelta: {x: 161, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671340978879436 CanvasRenderer: @@ -334,8 +334,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -535.1006, y: 274} - m_SizeDelta: {x: 150, y: 148} + m_AnchoredPosition: {x: -575, y: 274} + m_SizeDelta: {x: 193, y: 190} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341034218316 CanvasRenderer: @@ -467,8 +467,8 @@ RectTransform: 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: 17.5} - m_SizeDelta: {x: 94, y: 76} + m_AnchoredPosition: {x: 0, y: 24} + m_SizeDelta: {x: 87, y: 82} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341133373338 CanvasRenderer: @@ -541,8 +541,8 @@ RectTransform: 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: 17.5} - m_SizeDelta: {x: 94, y: 76} + m_AnchoredPosition: {x: 0, y: 25} + m_SizeDelta: {x: 118, y: 95} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341184677557 CanvasRenderer: @@ -615,8 +615,8 @@ RectTransform: 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: -32} - m_SizeDelta: {x: 92, y: 48} + m_AnchoredPosition: {x: 0, y: -52} + m_SizeDelta: {x: 161, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341497605160 CanvasRenderer: @@ -826,8 +826,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -355.2002, y: 274} - m_SizeDelta: {x: 150, y: 148} + m_AnchoredPosition: {x: -375, y: 274} + m_SizeDelta: {x: 193, y: 190} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341662576993 CanvasRenderer: @@ -960,7 +960,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 26} - m_SizeDelta: {x: 128, y: 112} + m_SizeDelta: {x: 167, y: 147} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341740920854 CanvasRenderer: @@ -1037,8 +1037,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -714, y: 274} - m_SizeDelta: {x: 150, y: 148} + m_AnchoredPosition: {x: -775, y: 274} + m_SizeDelta: {x: 193, y: 190} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341763054131 CanvasRenderer: @@ -1174,8 +1174,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -148, y: 297.30078} - m_SizeDelta: {x: 196, y: 194} + m_AnchoredPosition: {x: -140, y: 297.30078} + m_SizeDelta: {x: 254, y: 252} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3310671341787608545 CanvasRenderer: @@ -1307,8 +1307,8 @@ RectTransform: 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: -23.2} - m_SizeDelta: {x: 114, y: 38} + m_AnchoredPosition: {x: 0, y: -33.015877} + m_SizeDelta: {x: 161, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9142893009128331634 CanvasRenderer: @@ -1381,8 +1381,8 @@ RectTransform: 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: 17.5} - m_SizeDelta: {x: 94, y: 76} + m_AnchoredPosition: {x: 0, y: 28} + m_SizeDelta: {x: 78, y: 93} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1463838399473145955 CanvasRenderer: @@ -1459,8 +1459,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -896, y: 274.00073} - m_SizeDelta: {x: 150, y: 148} + m_AnchoredPosition: {x: -975, y: 274.00073} + m_SizeDelta: {x: 193, y: 190} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1213212977369348249 CanvasRenderer: diff --git a/popcorn/Assets/MyGame/Scenes/marketing/ProductManagement.unity b/popcorn/Assets/MyGame/Scenes/marketing/ProductManagement.unity index db7a032e..90da316b 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/ProductManagement.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/ProductManagement.unity @@ -213,7 +213,7 @@ PrefabInstance: - target: {fileID: 315354246554936540, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 12 + value: 8 objectReference: {fileID: 0} - target: {fileID: 566248750470715636, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -323,7 +323,7 @@ PrefabInstance: - target: {fileID: 1913713732571476837, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 13 + value: 9 objectReference: {fileID: 0} - target: {fileID: 2835369144934501534, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -525,20 +525,30 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -375 + objectReference: {fileID: 0} - target: {fileID: 3664916833752817996, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -575 + objectReference: {fileID: 0} - target: {fileID: 3906989310087811327, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 11 + value: 10 objectReference: {fileID: 0} - target: {fileID: 4037191023444158820, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 14 + value: 11 objectReference: {fileID: 0} - target: {fileID: 4348639590627783772, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -548,7 +558,7 @@ PrefabInstance: - target: {fileID: 5047569869407099398, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 10 + value: 14 objectReference: {fileID: 0} - target: {fileID: 6396292362141172708, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -568,7 +578,7 @@ PrefabInstance: - target: {fileID: 7715340749758393301, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 9 + value: 12 objectReference: {fileID: 0} - target: {fileID: 7758062554450272377, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -593,7 +603,7 @@ PrefabInstance: - target: {fileID: 8875044595818467139, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 8 + value: 13 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: caaa748dbeed576499e8cae74d33f689, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs index 697a24f0..5cd39b7c 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerAnimator.cs @@ -1,9 +1,12 @@ using System; +using TMPro; using UniRx; using UnityEngine; public class CustomerAnimator : MonoBehaviour { + public static readonly string WantFlavorAmountFormat = "x{0}"; + public static readonly int WalkFront = Animator.StringToHash("WalkFront"); public static readonly int WalkSide = Animator.StringToHash("WalkSide"); public static readonly int WalkBack = Animator.StringToHash("WalkBack"); @@ -22,6 +25,7 @@ public class CustomerAnimator : MonoBehaviour [SerializeField] private Transform rightPopcornTarget; [SerializeField] private Transform frontPopcornTarget; [SerializeField] private Transform wantFlavorSpriteTarget; + [SerializeField] private TextMeshPro wantFlavorAmountText; private readonly ReactiveProperty triggerName = new ReactiveProperty(); @@ -83,7 +87,7 @@ public class CustomerAnimator : MonoBehaviour } } - public void SetWantFlavor(MarketPopcornView prefab, ProductRarity rarity) + public void SetWantFlavor(MarketPopcornView prefab, ProductRarity rarity, int amount) { leftPopcornTarget.DestroyAllChildrens(); rightPopcornTarget.DestroyAllChildrens(); @@ -93,6 +97,8 @@ public class CustomerAnimator : MonoBehaviour Instantiate(prefab, rightPopcornTarget).ChangeRarity(rarity); Instantiate(prefab, frontPopcornTarget).ChangeRarity(rarity); Instantiate(prefab, wantFlavorSpriteTarget).ChangeRarity(rarity); + + wantFlavorAmountText.text = String.Format(WantFlavorAmountFormat, amount); } public void ShowWantFlavor() diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 345c2d21..f28c0af8 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -25,9 +25,11 @@ public class MarketManager : MonoBehaviour List productDataList; private readonly Subject resetRefreshTimer = new Subject(); + private readonly CompositeDisposable ShopClosedCompositeDisposable = new CompositeDisposable(); private void Start() { + ShopClosedCompositeDisposable.AddTo(this); resetRefreshTimer.AddTo(this); market = Market.Instance; @@ -46,26 +48,25 @@ public class MarketManager : MonoBehaviour var controller = market.SetTutorialCustomer(); walkerMask.SetTargetArrow(controller.transform); controller.State - .Where(x => x == CustomerState.Wait) - .Take(1) - .Subscribe(state => { }, () => + .FirstOrDefault(x => x == CustomerState.Wait) + .Subscribe(_ => { }, () => { walkerMask.SetArrowActive(false); }).AddTo(controller).AddTo(this); - walkerMask.SetTargetArrow(controller.transform); controller.State - .Where(x => x == CustomerState.EatingLeave) + .FirstOrDefault(x => x == CustomerState.EatingLeave) .Delay(TimeSpan.FromSeconds(3f)) - .Take(1) - .Subscribe(_ => + .Subscribe(_ => { }, () => { // チュートリアル終了 gameData.FinishTutorial(); GameDataManager.SaveGameData(); walkerMask.gameObject.SetActive(false); resetRefreshTimer.OnNext((int) DateTime.FromBinary(gameData.increaseCustomerTime).Subtract(DateTime.UtcNow).TotalSeconds); - rewardButtonView.gameObject.SetActive(true); - TutorialManager.Instance.ShowTutorialConversation(12); + TutorialManager.Instance.ShowTutorialConversation(12, () => + { + SetShopView(market.CurrentShopState.Value); + }); }).AddTo(controller).AddTo(this); }); } @@ -218,45 +219,54 @@ public class MarketManager : MonoBehaviour }).AddTo(this); // 開閉店 - CompositeDisposable shopStateCompositeDisposable = new CompositeDisposable(); - shopStateCompositeDisposable.AddTo(this); - market.CurrentShopState.Subscribe(state => - { - shopStateCompositeDisposable.Clear(); - switch (state) + market.CurrentShopState + .Where(_ => !gameData.isFirstPlay) + .Subscribe(state => { - case ShopState.Open: - BrotherPinkView.Instance.SetNormal(); - closeSign.SetActive(false); - break; - case ShopState.Busy: - break; - case ShopState.Close: - if (market.CustomerList.Count(x => x.State.Value == CustomerState.Order) == 0) - { - BrotherPinkView.Instance.SetSleepy(); - closeSign.SetActive(true); - } - else - { - // お客さんがいなくなったあと、閉店の看板を出す - Observable.CombineLatest( - market.CustomerList - .Select(x => x.State) - .Where(x => x.Value == CustomerState.Order)) - .FirstOrDefault(states => states.Count(x => x == CustomerState.Order) == 0) - .Delay(TimeSpan.FromSeconds(2f)) - .Subscribe(_ => - { - BrotherPinkView.Instance.SetSleepy(); - closeSign.SetActive(true); - }).AddTo(shopStateCompositeDisposable); - } - break; - default: - throw new ArgumentOutOfRangeException(nameof(state), state, null); - } - }).AddTo(this); + SetShopView(state); + }).AddTo(this); + } + + private void SetShopView(ShopState state) + { + ShopClosedCompositeDisposable.Clear(); + switch (state) + { + case ShopState.Open: + // 宣伝ボタン表示 + rewardButtonView.gameObject.SetActive(true); + BrotherPinkView.Instance.SetNormal(); + closeSign.SetActive(false); + break; + case ShopState.Busy: + break; + case ShopState.Close: + // 宣伝ボタン非表示 + rewardButtonView.gameObject.SetActive(false); + if (market.CustomerList.Count(x => x.State.Value == CustomerState.Order) == 0) + { + BrotherPinkView.Instance.SetSleepy(); + closeSign.SetActive(true); + } + else + { + // お客さんがいなくなったあと、閉店の看板を出す + Observable.CombineLatest( + market.CustomerList + .Select(x => x.State) + .Where(x => x.Value == CustomerState.Order)) + .FirstOrDefault(states => states.Count(x => x == CustomerState.Order) == 0) + .Delay(TimeSpan.FromSeconds(2f)) + .Subscribe(_ => + { + BrotherPinkView.Instance.SetSleepy(); + closeSign.SetActive(true); + }).AddTo(ShopClosedCompositeDisposable); + } + break; + default: + throw new ArgumentOutOfRangeException(nameof(state), state, null); + } } private void CoinEffect(int count) @@ -292,17 +302,22 @@ public class MarketManager : MonoBehaviour customerAnimator.SetSide(x); }).AddTo(customerAnimator); // フレーバー設定 - if (productDataList.FirstOrDefault(data => data.id == (controller.WantFlavor.Value?.FlavorId ?? -1))?.GetMarketPrefab() is MarketPopcornView initialPrefab) - { - customerAnimator.SetWantFlavor(initialPrefab, controller.WantFlavor.Value.Rarity); - } + controller.WantFlavor + .FirstOrDefault() + .Subscribe(wantData => + { + if (productDataList.FirstOrDefault(data => data.id == wantData?.FlavorId)?.GetMarketPrefab() is MarketPopcornView prefab) + { + customerAnimator.SetWantFlavor(prefab, wantData.Rarity, controller.OrderCount); + } + }).AddTo(customerAnimator); controller.WantFlavor .SkipLatestValueOnSubscribe() .Subscribe(wantData => { if (productDataList.FirstOrDefault(data => data.id == wantData.FlavorId)?.GetMarketPrefab() is MarketPopcornView prefab) { - customerAnimator.SetWantFlavor(prefab, wantData.Rarity); + customerAnimator.SetWantFlavor(prefab, wantData.Rarity, controller.OrderCount); customerAnimator.ShowWantFlavor(); } }).AddTo(customerAnimator); diff --git a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity index 2e2323c2..39443d3a 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity @@ -2433,6 +2433,11 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -22 objectReference: {fileID: 0} + - target: {fileID: 1909038109161790577, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} - target: {fileID: 1913713732571476837, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder @@ -2633,15 +2638,25 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.x - value: -355.19922 + value: -375 + objectReference: {fileID: 0} + - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 objectReference: {fileID: 0} - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.x - value: -535.10156 + value: -575 objectReference: {fileID: 0} - target: {fileID: 3906989310087811327, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -2660,8 +2675,8 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6969874152703327186, guid: caaa748dbeed576499e8cae74d33f689, type: 3} - propertyPath: m_AnchoredPosition.y - value: 260.69922 + propertyPath: m_LocalPosition.y + value: 0 objectReference: {fileID: 0} - target: {fileID: 7545339558603919741, guid: caaa748dbeed576499e8cae74d33f689, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/shopping/shopping.unity b/popcorn/Assets/MyGame/Scenes/shopping/shopping.unity index 1de5435e..7765206f 100644 --- a/popcorn/Assets/MyGame/Scenes/shopping/shopping.unity +++ b/popcorn/Assets/MyGame/Scenes/shopping/shopping.unity @@ -436,6 +436,11 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 1765.9999 objectReference: {fileID: 0} + - target: {fileID: 1909038109161790577, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} - target: {fileID: 3213111080442531914, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_IsActive @@ -621,6 +626,16 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 3664916833637780612, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -375 + objectReference: {fileID: 0} + - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -575 + objectReference: {fileID: 0} - target: {fileID: 4348639590627783772, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_IsActive