From d3b86d310cbbc6bad6d45d33ddb093811768a26c Mon Sep 17 00:00:00 2001 From: kimura Date: Thu, 3 Feb 2022 15:21:32 +0900 Subject: [PATCH 01/12] =?UTF-8?q?vip=E5=AE=A3=E4=BC=9D=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E5=87=A6=E7=90=86=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resource/Animation/Button_vip.controller | 31 ++++++++++++++++++- .../MyGame/Scenes/Main/Prefabs/Canvas.prefab | 15 +++++---- .../Scripts/VipCustomerButtonView.cs | 19 ++++++++++++ .../Scripts/VipCustomerButtonView.cs.meta | 3 ++ 4 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs create mode 100644 popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs.meta diff --git a/popcorn/Assets/MyGame/Resource/Animation/Button_vip.controller b/popcorn/Assets/MyGame/Resource/Animation/Button_vip.controller index d9c8146e..5a38ba45 100644 --- a/popcorn/Assets/MyGame/Resource/Animation/Button_vip.controller +++ b/popcorn/Assets/MyGame/Resource/Animation/Button_vip.controller @@ -38,6 +38,9 @@ AnimatorStateMachine: - serializedVersion: 1 m_State: {fileID: -3739160205852285787} m_Position: {x: 200, y: 0, z: 0} + - serializedVersion: 1 + m_State: {fileID: 877997704866898633} + m_Position: {x: 500, y: 120, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -47,7 +50,7 @@ AnimatorStateMachine: m_EntryPosition: {x: 50, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3739160205852285787} + m_DefaultState: {fileID: 877997704866898633} --- !u!91 &9100000 AnimatorController: m_ObjectHideFlags: 0 @@ -70,3 +73,29 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} +--- !u!1102 &877997704866898633 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: New State + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Canvas.prefab b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Canvas.prefab index a38db8be..c5603ff5 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Canvas.prefab +++ b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Canvas.prefab @@ -1472,7 +1472,7 @@ GameObject: - component: {fileID: 2633402978755532797} - component: {fileID: 4283180668829566650} m_Layer: 5 - m_Name: icon_fertilizer + m_Name: icon_vip m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2478,7 +2478,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1408184404978035950} - - component: {fileID: 1657996136668002032} + - component: {fileID: 512143980313251866} - component: {fileID: 2570027885372274640} - component: {fileID: 7731324448850360389} m_Layer: 5 @@ -2508,7 +2508,7 @@ RectTransform: m_AnchoredPosition: {x: 43, y: 684} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1657996136668002032 +--- !u!114 &512143980313251866 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2517,12 +2517,11 @@ MonoBehaviour: m_GameObject: {fileID: 7129812585269745309} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 825e8c21a1da42d494e43d1c51c40c24, type: 3} + m_Script: {fileID: 11500000, guid: 817f9d5cab724bb8a22de5e9dbd2f967, type: 3} m_Name: m_EditorClassIdentifier: - rewardButton: {fileID: 7453407021347122718} - DisableObject: {fileID: 0} - remainTimeText: {fileID: 0} + vipButton: {fileID: 7453407021347122718} + buttonAnimator: {fileID: 2570027885372274640} --- !u!95 &2570027885372274640 Animator: serializedVersion: 3 @@ -2642,7 +2641,7 @@ GameObject: - component: {fileID: 7453407021347122718} - component: {fileID: 403123792383491358} m_Layer: 5 - m_Name: Button_fertilizer_on + m_Name: Button_on m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs new file mode 100644 index 00000000..4d41eefa --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs @@ -0,0 +1,19 @@ +using System; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace MyGame.Scenes.marketing.Scripts +{ + public class VipCustomerButtonView : MonoBehaviour + { + [SerializeField] private Button vipButton; + [SerializeField] private Animator buttonAnimator; + public IObservable VipButton => vipButton.OnClickAsObservable().TakeUntilDestroy(this); + + public void ShowButton() + { + buttonAnimator.Play("Button_vip"); + } + } +} \ No newline at end of file diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs.meta b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs.meta new file mode 100644 index 00000000..c6098821 --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 817f9d5cab724bb8a22de5e9dbd2f967 +timeCreated: 1643868118 \ No newline at end of file From 063d9d9678ece635399c804bbe1d4e5e153ef14e Mon Sep 17 00:00:00 2001 From: kimura Date: Thu, 3 Feb 2022 15:22:54 +0900 Subject: [PATCH 02/12] =?UTF-8?q?vip=E5=AE=A3=E4=BC=9D=E3=83=80=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=83=AD=E3=82=B0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/Main/WatchMovieCoin.unity | 7 ++++--- popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs | 16 +++++++++++++++- popcorn/Assets/Resources/I2Languages.asset | 10 ++++++++++ popcorn/Assets/ScriptLocalization.cs | 2 ++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoin.unity b/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoin.unity index d1414acb..4b7d1688 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoin.unity +++ b/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoin.unity @@ -1599,6 +1599,7 @@ MonoBehaviour: coinObject: {fileID: 1081810292} fertilizerObject: {fileID: 471677967} publicityObject: {fileID: 262919494} + vipObject: {fileID: 1793920305} --- !u!1 &1450516236 GameObject: m_ObjectHideFlags: 0 @@ -1771,7 +1772,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 7c7c75e9f60f2456e9e49a6f81181b90, type: 3} + m_Sprite: {fileID: 21300000, guid: de598de8a3393044686c7ef88b193396, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -2163,7 +2164,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 12800000, guid: 89edfb758376d401583d3bad3def2b62, type: 3} + m_Font: {fileID: 12800000, guid: b5532e9ce15694f55a0893a76a98cd78, type: 3} m_FontSize: 35 m_FontStyle: 0 m_BestFit: 1 @@ -2839,7 +2840,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: ba037169854dc4c1db3853c4700f027c, type: 3} + m_Sprite: {fileID: 21300000, guid: 490f9ea68882b7b48bcc2974a41f8bcd, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs index 88693f7a..498cc366 100644 --- a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs +++ b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs @@ -14,7 +14,8 @@ namespace MyGame.Scripts Coin, CornField, IncreaseCustomer, - PerfectPopcorn + PerfectPopcorn, + VipCustomer } private static readonly string OkCallbackTag = "GetRewardDialogOkCallbackTag"; private static readonly string RewardTypeTag = "GetRewardDialogRewardTypeTag"; @@ -35,6 +36,7 @@ namespace MyGame.Scripts [SerializeField] private GameObject coinObject; [SerializeField] private GameObject fertilizerObject; [SerializeField] private GameObject publicityObject; + [SerializeField] private GameObject vipObject; private void Start() { @@ -42,6 +44,7 @@ namespace MyGame.Scripts coinObject.SetActive(false); fertilizerObject.SetActive(false); publicityObject.SetActive(false); + vipObject.SetActive(false); switch (LocalCacheManager.Load(RewardTypeTag)) { case RewardType.Coin: @@ -67,6 +70,12 @@ namespace MyGame.Scripts messageText.text = ScriptLocalization.System.PerfectPopcornMessage; SetButtonAction(closeButton, okButton); break; + case RewardType.VipCustomer: + normalWindow.SetActive(true); + vipObject.SetActive(true); + messageText.text = ScriptLocalization.System.VipCustomerMessage; + SetButtonAction(closeButton, okButton); + break; default: throw new ArgumentOutOfRangeException(); } @@ -132,5 +141,10 @@ namespace MyGame.Scripts { ShowDialog(okCallback, RewardType.PerfectPopcorn); } + + public static void ShowVipCustomerDialog(Action okCallback) + { + ShowDialog(okCallback, RewardType.VipCustomer); + } } } \ No newline at end of file diff --git a/popcorn/Assets/Resources/I2Languages.asset b/popcorn/Assets/Resources/I2Languages.asset index a0de9bf5..50e0d6a2 100644 --- a/popcorn/Assets/Resources/I2Languages.asset +++ b/popcorn/Assets/Resources/I2Languages.asset @@ -8419,6 +8419,16 @@ MonoBehaviour: - Flags: 00000000 Languages_Touch: [] + - Term: System/VipCustomerMessage + TermType: 0 + Description: + Languages: + - "VIP\u306A\u304A\u5BA2\u306B\u304A\u9858\u3044\u3059\u308B\u3068\nVIP\u306A\u304A\u53CB\u9054\u3092\u9023\u308C\u3066\u304D\u3066\u304F\u308C\u308B\u3088\uFF01\n\u52D5\u753B\u3092\u898B\u3066\u304A\u9858\u3044\u3057\u307E\u3059\u304B\uFF1F" + - + - + - + Flags: 00000000 + Languages_Touch: [] CaseInsensitiveTerms: 0 OnMissingTranslation: 3 mTerm_AppName: diff --git a/popcorn/Assets/ScriptLocalization.cs b/popcorn/Assets/ScriptLocalization.cs index 5212dc6d..aa8dc148 100644 --- a/popcorn/Assets/ScriptLocalization.cs +++ b/popcorn/Assets/ScriptLocalization.cs @@ -18,6 +18,7 @@ namespace I2.Loc public static string CornFieldMessage { get{ return LocalizationManager.GetTranslation ("System/CornFieldMessage"); } } public static string IncreaseCustomerMessage { get{ return LocalizationManager.GetTranslation ("System/IncreaseCustomerMessage"); } } public static string PerfectPopcornMessage { get{ return LocalizationManager.GetTranslation ("System/PerfectPopcornMessage"); } } + public static string VipCustomerMessage { get{ return LocalizationManager.GetTranslation ("System/VipCustomerMessage"); } } } public static class UI @@ -66,6 +67,7 @@ namespace I2.Loc public const string CornFieldMessage = "System/CornFieldMessage"; public const string IncreaseCustomerMessage = "System/IncreaseCustomerMessage"; public const string PerfectPopcornMessage = "System/PerfectPopcornMessage"; + public const string VipCustomerMessage = "System/VipCustomerMessage"; } public static class UI From 39d2cd0116f3059f9174438e3fb89383ab6110c1 Mon Sep 17 00:00:00 2001 From: kimura Date: Thu, 3 Feb 2022 15:23:38 +0900 Subject: [PATCH 03/12] =?UTF-8?q?Market=E3=82=B7=E3=83=BC=E3=83=B3vip?= =?UTF-8?q?=E5=AE=A3=E4=BC=9D=E3=83=9C=E3=82=BF=E3=83=B3=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/MarketManager.cs | 10 ++++++++++ .../MyGame/Scenes/marketing/marketing.unity | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 8c5003b1..3587ca73 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -17,6 +17,7 @@ public class MarketManager : MonoBehaviour [SerializeField] private MarketCartView cartView; [SerializeField] private BrotherBlueView blueView; [SerializeField] private IncreaseCustomerButtonView rewardButtonView; + [SerializeField] private VipCustomerButtonView vipCustomerButtonView; [SerializeField] private MarketSignBoardView signBoardView; [SerializeField] private Transform pinkTarget; [SerializeField] private Transform coinPrefab; @@ -123,6 +124,15 @@ public class MarketManager : MonoBehaviour resetRefreshTimer.OnNext(Unit.Default); }); }).AddTo(this); + + vipCustomerButtonView.ShowButton(); + vipCustomerButtonView.VipButton.ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ => + { + GetRewardDialog.ShowVipCustomerDialog(() => + { + + }); + }).AddTo(this); // onNextをトリガーに実行 IDisposable timerDisposable = null; diff --git a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity index ab59e413..8bc3f449 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity @@ -4083,6 +4083,11 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 274 objectReference: {fileID: 0} + - target: {fileID: 7129812585269745309, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 7545339558603919741, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_AnchoredPosition.x @@ -4133,6 +4138,18 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 714437464} m_PrefabAsset: {fileID: 0} +--- !u!114 &714437466 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + m_PrefabInstance: {fileID: 714437464} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 817f9d5cab724bb8a22de5e9dbd2f967, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &716489324 GameObject: m_ObjectHideFlags: 0 @@ -5729,6 +5746,7 @@ MonoBehaviour: cartView: {fileID: 2048621276} blueView: {fileID: 1506158581} rewardButtonView: {fileID: 820175261} + vipCustomerButtonView: {fileID: 714437466} signBoardView: {fileID: 1732899481} pinkTarget: {fileID: 1749782974} coinPrefab: {fileID: 8159396421809467538, guid: 9fc8076f17c26ff4d9be53b90a7dad4c, From d9b6faed13dca329adbe338e9d39a42dc948acbe Mon Sep 17 00:00:00 2001 From: koya_15 Date: Thu, 3 Feb 2022 19:11:41 +0900 Subject: [PATCH 04/12] =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=AE=E9=81=8A?= =?UTF-8?q?=E3=81=B3=E6=96=B9=E3=83=9C=E3=82=BF=E3=83=B3=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=8C=E9=96=93=E9=81=95=E3=81=A3=E3=81=A6=E3=81=9F=E3=81=9F?= =?UTF-8?q?=E3=82=81=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Settings/SettingsDialog.unity | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Settings/SettingsDialog.unity b/popcorn/Assets/MyGame/Scenes/Settings/SettingsDialog.unity index b93d5a4f..175ff518 100644 --- a/popcorn/Assets/MyGame/Scenes/Settings/SettingsDialog.unity +++ b/popcorn/Assets/MyGame/Scenes/Settings/SettingsDialog.unity @@ -3220,7 +3220,6 @@ GameObject: - component: {fileID: 1794914334} - component: {fileID: 1794914337} - component: {fileID: 1794914336} - - component: {fileID: 1794914335} m_Layer: 5 m_Name: Image_text m_TagString: Untagged @@ -3247,46 +3246,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 4} m_SizeDelta: {x: 96, y: 40} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1794914335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794914333} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 344445a89b4f74a0e9a0a766903df87e, type: 3} - m_Name: - m_EditorClassIdentifier: - mTerm: ui_button_icon_close_logo_small - mTermSecondary: - PrimaryTermModifier: 0 - SecondaryTermModifier: 0 - TermPrefix: - TermSuffix: - LocalizeOnAwake: 1 - IgnoreRTL: 0 - MaxCharactersInRTL: 0 - IgnoreNumbersInRTL: 1 - CorrectAlignmentForRTL: 1 - AddSpacesToJoinedLanguages: 0 - AllowLocalizedParameters: 1 - AllowParameters: 1 - TranslatedObjects: - - {fileID: 21300000, guid: f3a0ccdabb17f2244abcb3798b5b589e, type: 3} - LocalizeEvent: - m_PersistentCalls: - m_Calls: [] - AlwaysForceLocalize: 0 - LocalizeCallBack: - Target: {fileID: 0} - MethodName: - mGUI_ShowReferences: 0 - mGUI_ShowTems: 1 - mGUI_ShowCallback: 0 - mLocalizeTarget: {fileID: 2060162125} - mLocalizeTargetName: I2.Loc.LocalizeTarget_UnityUI_Image --- !u!114 &1794914336 MonoBehaviour: m_ObjectHideFlags: 0 From be8f8549335a4f8a7ac28402959d7e0fbd063473 Mon Sep 17 00:00:00 2001 From: koya_15 Date: Fri, 4 Feb 2022 14:32:50 +0900 Subject: [PATCH 05/12] =?UTF-8?q?=E3=83=9F=E3=83=83=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E6=8A=9C=E3=81=91=E7=94=BB=E5=83=8F=E5=86=8D=E5=BA=A6?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/MyGame/Scenes/Main/Mission.unity | 357 ++++++++++++------ .../Main/Prefabs/Mission/MissionCanvas.prefab | 12 +- 2 files changed, 251 insertions(+), 118 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Main/Mission.unity b/popcorn/Assets/MyGame/Scenes/Main/Mission.unity index f488c073..3412e949 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Mission.unity +++ b/popcorn/Assets/MyGame/Scenes/Main/Mission.unity @@ -121,18 +121,19 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &48717369 stripped +--- !u!114 &22296242 MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5315427058870261576, guid: 66c0408cd45e7422cb6d59d2bdf4e998, - type: 3} - m_PrefabInstance: {fileID: 55686909} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 332e36893e7cf4a49b3c1f72f76cd5e1, type: 3} m_Name: m_EditorClassIdentifier: + mTarget: {fileID: 55686915} --- !u!1001 &55686909 PrefabInstance: m_ObjectHideFlags: 0 @@ -140,6 +141,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 73786970766650198, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 470528878150322008, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} propertyPath: m_AnchorMax.x @@ -197,6 +203,22 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1948332030859109782, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: mLocalizeTarget + value: + objectReference: {fileID: 1877237825} + - target: {fileID: 1948332030859109782, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1948332030859109782, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.data[0] + value: + objectReference: {fileID: 21300000, guid: 5d1e87eb3bb45484faaeea95f63dc072, + type: 3} - target: {fileID: 2088785184059642796, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} propertyPath: m_Sprite @@ -574,6 +596,43 @@ PrefabInstance: value: objectReference: {fileID: 21300000, guid: a9e961473b18e3248b466d48987ac4b2, type: 3} + - target: {fileID: 5631139686551261399, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: mLocalizeTarget + value: + objectReference: {fileID: 535073476} + - target: {fileID: 5631139686551261399, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5631139686551261399, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.data[0] + value: + objectReference: {fileID: 21300000, guid: 5d1e87eb3bb45484faaeea95f63dc072, + type: 3} + - target: {fileID: 5648759929853669395, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6165330503802040305, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: mLocalizeTarget + value: + objectReference: {fileID: 1526372568} + - target: {fileID: 6165330503802040305, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6165330503802040305, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + propertyPath: TranslatedObjects.Array.data[0] + value: + objectReference: {fileID: 21300000, guid: 5d1e87eb3bb45484faaeea95f63dc072, + type: 3} - target: {fileID: 6700388378296198159, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} propertyPath: m_AnchorMax.x @@ -596,9 +655,9 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} ---- !u!114 &73758579 stripped +--- !u!114 &55686910 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2088785184059642796, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + m_CorrespondingSourceObject: {fileID: 7673446267768404167, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} m_PrefabInstance: {fileID: 55686909} m_PrefabAsset: {fileID: 0} @@ -608,19 +667,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &230435945 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2660639678739049204, guid: 66c0408cd45e7422cb6d59d2bdf4e998, - type: 3} - m_PrefabInstance: {fileID: 55686909} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &341744830 stripped +--- !u!114 &55686911 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 518689044540430268, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} @@ -632,9 +679,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &360061174 stripped +--- !u!114 &55686912 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2660639679015166989, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + m_CorrespondingSourceObject: {fileID: 5315427058870261576, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} m_PrefabInstance: {fileID: 55686909} m_PrefabAsset: {fileID: 0} @@ -644,73 +691,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &885865648 stripped +--- !u!114 &55686913 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5302925502965666185, guid: 66c0408cd45e7422cb6d59d2bdf4e998, - type: 3} - m_PrefabInstance: {fileID: 55686909} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1032004766 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} - m_Name: - m_EditorClassIdentifier: - mTarget: {fileID: 1092775355} ---- !u!114 &1064145805 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} - m_Name: - m_EditorClassIdentifier: - mTarget: {fileID: 230435945} ---- !u!114 &1089516913 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} - m_Name: - m_EditorClassIdentifier: - mTarget: {fileID: 48717369} ---- !u!114 &1092338131 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} - m_Name: - m_EditorClassIdentifier: - mTarget: {fileID: 73758579} ---- !u!114 &1092775355 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2660639678406526125, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + m_CorrespondingSourceObject: {fileID: 2088785184059642796, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} m_PrefabInstance: {fileID: 55686909} m_PrefabAsset: {fileID: 0} @@ -720,20 +703,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &1178903781 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 332e36893e7cf4a49b3c1f72f76cd5e1, type: 3} - m_Name: - m_EditorClassIdentifier: - mTarget: {fileID: 885865648} ---- !u!114 &1200797307 stripped +--- !u!114 &55686914 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 3089254109135973278, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} @@ -745,7 +715,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &1479870730 stripped +--- !u!114 &55686915 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5302925502965666185, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &55686916 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 2660639677480706697, guid: 66c0408cd45e7422cb6d59d2bdf4e998, type: 3} @@ -757,7 +739,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &1538003472 +--- !u!114 &55686917 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2660639678406526125, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &55686918 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2660639679015166989, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &55686919 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2660639678739049204, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &55686920 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2362301707389979568, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &55686921 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 968457695405726169, guid: 66c0408cd45e7422cb6d59d2bdf4e998, + type: 3} + m_PrefabInstance: {fileID: 55686909} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &92922530 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -769,8 +811,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} m_Name: m_EditorClassIdentifier: - mTarget: {fileID: 360061174} ---- !u!114 &1660846284 + mTarget: {fileID: 55686918} +--- !u!114 &431592529 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -782,8 +824,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} m_Name: m_EditorClassIdentifier: - mTarget: {fileID: 1200797307} ---- !u!114 &1868087303 + mTarget: {fileID: 55686911} +--- !u!114 &535073476 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -795,8 +837,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} m_Name: m_EditorClassIdentifier: - mTarget: {fileID: 341744830} ---- !u!114 &1895385517 + mTarget: {fileID: 55686921} +--- !u!114 &571125603 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -805,10 +847,75 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 332e36893e7cf4a49b3c1f72f76cd5e1, type: 3} + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} m_Name: m_EditorClassIdentifier: - mTarget: {fileID: 1479870730} + mTarget: {fileID: 55686914} +--- !u!114 &801028859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686919} +--- !u!114 &983214044 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686913} +--- !u!114 &1148965748 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686917} +--- !u!114 &1526372568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686910} +--- !u!114 &1877237825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686920} --- !u!1001 &1944170687 PrefabInstance: m_ObjectHideFlags: 0 @@ -884,3 +991,29 @@ Camera: type: 3} m_PrefabInstance: {fileID: 1944170687} m_PrefabAsset: {fileID: 0} +--- !u!114 &1962071691 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 332e36893e7cf4a49b3c1f72f76cd5e1, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686916} +--- !u!114 &2053093782 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bedef2aeaac8da04faa9a07b7241d0ad, type: 3} + m_Name: + m_EditorClassIdentifier: + mTarget: {fileID: 55686912} diff --git a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Mission/MissionCanvas.prefab b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Mission/MissionCanvas.prefab index eb8c6ab5..18c9b522 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Mission/MissionCanvas.prefab +++ b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/Mission/MissionCanvas.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2485849122900942437} - component: {fileID: 9199389168504249485} - component: {fileID: 968457695405726169} - - component: {fileID: 6099069952261714468} + - component: {fileID: 5631139686551261399} m_Layer: 5 m_Name: Cooked m_TagString: Untagged @@ -75,7 +75,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!114 &6099069952261714468 +--- !u!114 &5631139686551261399 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -4618,7 +4618,7 @@ GameObject: - component: {fileID: 5723880628462744749} - component: {fileID: 1455510406861626823} - component: {fileID: 7673446267768404167} - - component: {fileID: 412364985173912892} + - component: {fileID: 6165330503802040305} m_Layer: 5 m_Name: Cooked m_TagString: Untagged @@ -4682,7 +4682,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!114 &412364985173912892 +--- !u!114 &6165330503802040305 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -5772,7 +5772,7 @@ GameObject: - component: {fileID: 561343442237248935} - component: {fileID: 7860309679329529339} - component: {fileID: 2362301707389979568} - - component: {fileID: 8529197286358042402} + - component: {fileID: 1948332030859109782} m_Layer: 5 m_Name: Cooked m_TagString: Untagged @@ -5836,7 +5836,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!114 &8529197286358042402 +--- !u!114 &1948332030859109782 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} From 3ba046e754e821cfa3b47b6720bce026059eb9cc Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 16:48:59 +0900 Subject: [PATCH 06/12] =?UTF-8?q?=E3=82=BB=E3=83=AC=E3=83=96=E7=94=A8Flow?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/CustomerFlow.cs | 23 ++++++++++++++++++- .../MyGame/Scenes/marketing/Scripts/Market.cs | 5 ++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs index 60b95341..fe48a028 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs @@ -9,6 +9,8 @@ public class CustomerFlow : MonoBehaviour private IObservable walkerObservable; private IObservable adWalkerObservable; private readonly Subject> adStartObservable = new Subject>(); + private IObservable vipCustomerObservable; + private readonly Subject> vipCustomerSubject = new Subject>(); private IObservable tastingCustomerObservable; private static readonly float checkHeartInterval = 1f; @@ -19,6 +21,11 @@ public class CustomerFlow : MonoBehaviour [SerializeField] private float adWalkerDuration = 60f; [Header("宣伝で来るお客さんの数")] [SerializeField] private int adWalkerCount = 20; + + [Header("VIP宣伝で来るお客さんの数")] + [SerializeField] private int vipCustomerCount = 6; + [Header("VIP宣伝で来るお客さん出現間隔(秒)")] + [SerializeField] private float vipCustomerInterval = 5f; [Header("試食のお客さん出現間隔(秒)")] [SerializeField] private float tastingCustomerInterval = 5f; @@ -26,11 +33,12 @@ public class CustomerFlow : MonoBehaviour public float TastingCustomerInterval => tastingCustomerInterval; private int adActiveCount = 0; - public IObservable Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, tastingCustomerObservable); + public IObservable Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, vipCustomerObservable, tastingCustomerObservable); private void Awake() { adStartObservable.AddTo(this); + vipCustomerSubject.AddTo(this); var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopLevelDataSheet); shopLevelList = shopLevelList.Where(data => data.shopLevel != Const.SpecialShopLevel).ToList(); @@ -68,6 +76,12 @@ public class CustomerFlow : MonoBehaviour // Observable.Timer(TimeSpan.FromSeconds(1f), TimeSpan.FromSeconds(70f)).Subscribe(_ => { adStartObservable.OnNext(default); }).AddTo(this); } #endif + + // VIP宣伝 + vipCustomerObservable = vipCustomerSubject + .Switch() + .Select(_ => true); + // 試食 // tastingCustomerInterval毎にTastingCountを確認 var tastingTimer = Observable.Interval(TimeSpan.FromSeconds(tastingCustomerInterval)) @@ -104,4 +118,11 @@ public class CustomerFlow : MonoBehaviour .Take(TimeSpan.FromSeconds(adWalkerDuration)) .AsUnitObservable(); } + + public void StartVip() + { + vipCustomerSubject.OnNext(Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(vipCustomerInterval)) + .Take(vipCustomerCount) + .AsUnitObservable()); + } } diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs index 70d6017c..699bf550 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs @@ -540,6 +540,11 @@ public class Market : SingletonMonoBehaviour }); } + public void VipAction() + { + customerFlow.StartVip(); + } + public CustomerController SetTutorialCustomer() { var customerController = SpawnCustomer(); From fbccefe07c82c13b2e19312c8e1eabf28ea1fd67 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 16:51:01 +0900 Subject: [PATCH 07/12] =?UTF-8?q?VIP=E5=AE=A3=E4=BC=9D=E3=83=95=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E5=88=A4=E5=AE=9A=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/Cooking/Scripts/CookingResult.cs | 14 ++++++++++++++ popcorn/Assets/MyGame/Scripts/Const.cs | 2 ++ popcorn/Assets/MyGame/Scripts/GameDataManager.cs | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs index 14654c4c..2bebac21 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs @@ -7,6 +7,7 @@ using TMPro; using UniRx; using UnityEngine; using UnityEngine.UI; +using Random = UnityEngine.Random; public class CookingResult : MonoBehaviour { @@ -140,6 +141,19 @@ public class CookingResult : MonoBehaviour { // 獲得、遷移 MoveStock(GameDataManager.GameData.WaitAddStock); + + // 確率でVip宣伝 + if (GameDataManager.GameData.ShopStock.Count >= Const.VipCustomerRewardStock) + { + if (Random.value <= Const.VipCustomerRewardRate) + { +#if UNITY_EDITOR + Debug.Log($"flag VipReward"); +#endif + GameDataManager.GameData.vipCustomerFirstOpen = true; + GameDataManager.GameData.vipCustomerLimitTime = DateTime.UtcNow.AddSeconds(60).ToBinary(); + } + } GameDataManager.SaveGameData(); Market.Instance.IsPause.Value = false; TransitionManager.Instance.LoadScene(GameScenes.Main); diff --git a/popcorn/Assets/MyGame/Scripts/Const.cs b/popcorn/Assets/MyGame/Scripts/Const.cs index 3c8bea68..54a04a3b 100644 --- a/popcorn/Assets/MyGame/Scripts/Const.cs +++ b/popcorn/Assets/MyGame/Scripts/Const.cs @@ -22,6 +22,8 @@ public static class Const { public static readonly int[] FieldTutorial = { 5, 12, 6 }; public static readonly int[] ShoppingTutorial = { 7, 13, 8}; public static readonly int[] ManagementTutorial = { 9 }; + public static readonly float VipCustomerRewardStock = 20; // Market.ShopStockCount以下にする + public static readonly float VipCustomerRewardRate = 0.01f; // tag public static readonly string GameDataTag = "GameData"; diff --git a/popcorn/Assets/MyGame/Scripts/GameDataManager.cs b/popcorn/Assets/MyGame/Scripts/GameDataManager.cs index 81b65cbe..4daf5580 100644 --- a/popcorn/Assets/MyGame/Scripts/GameDataManager.cs +++ b/popcorn/Assets/MyGame/Scripts/GameDataManager.cs @@ -144,6 +144,12 @@ public sealed class GameData { public int WaitAddHeart; [DataMember(Name = "Data42")] public ProductStockData WaitAddStock; + + // reward(v1.1追加) + [DataMember(Name = "Data51")] + public long vipCustomerLimitTime = DateTime.UtcNow.ToBinary(); + [DataMember(Name = "Data52")] + public bool vipCustomerFirstOpen; // mission [DataMember(Name = "Data1001")] From b1de1c25147a8076e4aaef04ba88ff8c0cee92a4 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 17:07:57 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=E5=8B=95=E7=94=BB=E3=83=AA=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=92=E9=96=89=E3=81=98=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AE?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/MyGame/Scripts/GetRewardDialog.cs | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs index 498cc366..f761ae11 100644 --- a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs +++ b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs @@ -18,6 +18,7 @@ namespace MyGame.Scripts VipCustomer } private static readonly string OkCallbackTag = "GetRewardDialogOkCallbackTag"; + private static readonly string CloseCallbackTag = "GetRewardDialogCloseCallbackTag"; private static readonly string RewardTypeTag = "GetRewardDialogRewardTypeTag"; private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger"); @@ -89,6 +90,8 @@ namespace MyGame.Scripts backgroundAnimator.SetTrigger(CloseTrigger); this.CallWaitForSeconds(.25f, () => { + LocalCacheManager.Load(CloseCallbackTag, null)?.Invoke(); + LocalCacheManager.Remove(CloseCallbackTag); TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin); }); }).AddTo(this); @@ -115,36 +118,37 @@ namespace MyGame.Scripts }).AddTo(this); } - private static void ShowDialog(Action okCallback, RewardType rewardType) + private static void ShowDialog(RewardType rewardType, Action okCallback, Action closeCallback) { LocalCacheManager.Save(OkCallbackTag, okCallback); + LocalCacheManager.Save(CloseCallbackTag, closeCallback); LocalCacheManager.Save(RewardTypeTag, rewardType); TransitionManager.Instance.LoadSceneAdditive(GameScenes.WatchMovieCoin); } - public static void ShowCoinDialog(Action okCallback) + public static void ShowCoinDialog(Action okCallback = null, Action closeCallback = null) { - ShowDialog(okCallback, RewardType.Coin); + ShowDialog(RewardType.Coin, okCallback, closeCallback); } - public static void ShowCornFieldDialog(Action okCallback) + public static void ShowCornFieldDialog(Action okCallback = null, Action closeCallback = null) { - ShowDialog(okCallback, RewardType.CornField); + ShowDialog(RewardType.CornField, okCallback, closeCallback); } - public static void ShowIncreaseCustomerDialog(Action okCallback) + public static void ShowIncreaseCustomerDialog(Action okCallback = null, Action closeCallback = null) { - ShowDialog(okCallback, RewardType.IncreaseCustomer); + ShowDialog(RewardType.IncreaseCustomer, okCallback, closeCallback); } - public static void ShowPerfectPopcornDialog(Action okCallback) + public static void ShowPerfectPopcornDialog(Action okCallback = null, Action closeCallback = null) { - ShowDialog(okCallback, RewardType.PerfectPopcorn); + ShowDialog(RewardType.PerfectPopcorn, okCallback, closeCallback); } - public static void ShowVipCustomerDialog(Action okCallback) + public static void ShowVipCustomerDialog(Action okCallback = null, Action closeCallback = null) { - ShowDialog(okCallback, RewardType.VipCustomer); + ShowDialog(RewardType.VipCustomer, okCallback, closeCallback); } } } \ No newline at end of file From 48dce0fcfc01c167905838673ead8ba8ca19f806 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 17:11:15 +0900 Subject: [PATCH 09/12] =?UTF-8?q?vip=E5=AE=A3=E4=BC=9Dview=E5=87=A6?= =?UTF-8?q?=E7=90=86=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Avatars/customer_Luxury_Gray.prefab | 44 +++++++-- .../Scripts/VipCustomerButtonView.cs | 89 ++++++++++++++++++- 2 files changed, 124 insertions(+), 9 deletions(-) diff --git a/popcorn/Assets/MyGame/Resources/Avatars/customer_Luxury_Gray.prefab b/popcorn/Assets/MyGame/Resources/Avatars/customer_Luxury_Gray.prefab index 4e1ab681..196f8945 100644 --- a/popcorn/Assets/MyGame/Resources/Avatars/customer_Luxury_Gray.prefab +++ b/popcorn/Assets/MyGame/Resources/Avatars/customer_Luxury_Gray.prefab @@ -813,6 +813,7 @@ GameObject: - component: {fileID: 5201512537784308050} - component: {fileID: 7687630557404592465} - component: {fileID: 6786587213025535951} + - component: {fileID: 1491786667167105538} m_Layer: 0 m_Name: movie_VIP m_TagString: Untagged @@ -900,6 +901,32 @@ Animation: m_PlayAutomatically: 1 m_AnimatePhysics: 0 m_CullingType: 0 +--- !u!61 &1491786667167105538 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6877570175858391367} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0.40160847, y: -0.08085698} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.8577533, y: 0.041125536} + oldSize: {x: 1.56, y: 1.76} + newSize: {x: 0.58, y: 0.64} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 3.4794078, y: 3.4169888} + m_EdgeRadius: 0 --- !u!1 &8035936346664169813 GameObject: m_ObjectHideFlags: 0 @@ -1159,6 +1186,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2524396702494263387, guid: 8c6dcd9482c51504e89ba42234369eda, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2524396703020600743, guid: 8c6dcd9482c51504e89ba42234369eda, type: 3} propertyPath: m_IsActive @@ -1243,18 +1275,18 @@ Transform: type: 3} m_PrefabInstance: {fileID: 6244917521789390651} m_PrefabAsset: {fileID: 0} ---- !u!4 &8476357289219494445 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2524396703577414934, guid: 8c6dcd9482c51504e89ba42234369eda, - type: 3} - m_PrefabInstance: {fileID: 6244917521789390651} - m_PrefabAsset: {fileID: 0} --- !u!4 &8476357287308305102 stripped Transform: m_CorrespondingSourceObject: {fileID: 2524396702732955125, guid: 8c6dcd9482c51504e89ba42234369eda, type: 3} m_PrefabInstance: {fileID: 6244917521789390651} m_PrefabAsset: {fileID: 0} +--- !u!4 &8476357289219494445 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2524396703577414934, guid: 8c6dcd9482c51504e89ba42234369eda, + type: 3} + m_PrefabInstance: {fileID: 6244917521789390651} + m_PrefabAsset: {fileID: 0} --- !u!1001 &6601841578865518209 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs index 4d41eefa..ccd7168f 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs @@ -1,5 +1,6 @@ using System; using UniRx; +using UniRx.Triggers; using UnityEngine; using UnityEngine.UI; @@ -9,11 +10,93 @@ namespace MyGame.Scenes.marketing.Scripts { [SerializeField] private Button vipButton; [SerializeField] private Animator buttonAnimator; - public IObservable VipButton => vipButton.OnClickAsObservable().TakeUntilDestroy(this); + [SerializeField] private Animator vipCustomerAnimator; + [SerializeField] private CustomerDirection customerDirection; + [SerializeField] private GameObject vipSpeechBubbleObject; + [SerializeField] private Transform vipStayPosTransform; + [SerializeField] private float vipMoveSpeed; + public IObservable VipButton { get; private set; } + private IDisposable timerDisposable; + private Vector3 initialPos; - public void ShowButton() + private void Awake() { - buttonAnimator.Play("Button_vip"); + vipButton.transform.SetLocalScale(0f); + vipCustomerAnimator.transform.SetLocalScale(0f); + initialPos = vipCustomerAnimator.transform.localPosition; + var eventTrigger = vipSpeechBubbleObject.AddComponent(); + VipButton = vipButton.OnClickAsObservable() + .Merge(eventTrigger.OnPointerClickAsObservable().AsUnitObservable()) + .TakeUntilDestroy(this); + } + + public void ShowButton(bool animated) + { + buttonAnimator.Play("Button_vip", 0, animated ? 0 : 1); + vipButton.transform.SetLocalScale(1f); + vipCustomerAnimator.transform.SetLocalScale(1f); + vipSpeechBubbleObject.SetActive(false); + customerDirection.SetDefaultSide(); + if (animated) + { + // 左から歩いてきて立ち止まってmovie_Vip再生 + vipCustomerAnimator.speed = 1f; + vipCustomerAnimator.Play("customer_nomal_walk_side"); + var vipTransform = vipCustomerAnimator.transform; + this.UpdateAsObservable() + .TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, vipStayPosTransform.localPosition) > .01f) + .Subscribe(_ => + { + vipTransform.localPosition = Vector2.MoveTowards(vipTransform.localPosition, vipStayPosTransform.localPosition, vipMoveSpeed * Time.deltaTime); + }, () => + { + vipCustomerAnimator.speed = 0f; + vipCustomerAnimator.Play("customer_nomal"); + vipSpeechBubbleObject.SetActive(true); + }).AddTo(this); + } + else + { + vipCustomerAnimator.speed = 0f; + vipCustomerAnimator.Play("customer_nomal"); + vipSpeechBubbleObject.SetActive(true); + } + } + + private void CloseButton() + { + if (vipSpeechBubbleObject.TryGetComponent(out var target)) + { + target.enabled = false; + } + // vip左にはける + customerDirection.SetFlipSide(); + vipCustomerAnimator.speed = 1f; + vipCustomerAnimator.Play("customer_nomal_walk_side"); + vipButton.transform.SetLocalScale(0f); + var vipTransform = vipCustomerAnimator.transform; + this.UpdateAsObservable() + .TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, initialPos) > .01f) + .Subscribe(_ => + { + vipTransform.localPosition = Vector2.MoveTowards(vipTransform.localPosition, initialPos, vipMoveSpeed * Time.deltaTime); + }, () => + { + vipCustomerAnimator.transform.SetLocalScale(0f); + }).AddTo(this); + } + + public void ResetTimer(int time) + { + // タイマーの更新処理 + timerDisposable?.Dispose(); + timerDisposable = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1f)) + .Select(x => (int)(time - x)) + .TakeWhile(x => x > 0) + .Subscribe(x => { }, () => + { + CloseButton(); + }).AddTo(this); } } } \ No newline at end of file From e6ffd80e7adf7669cb7f58a78bd228d896b6d30c Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 17:12:08 +0900 Subject: [PATCH 10/12] =?UTF-8?q?vip=E5=AE=A3=E4=BC=9D=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E8=A1=A8=E7=A4=BA=E5=87=A6=E7=90=86=E3=82=92Manager?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/IncreaseCustomerButtonView.cs | 23 +- .../Scenes/marketing/Scripts/MarketManager.cs | 59 ++--- .../MyGame/Scenes/marketing/marketing.unity | 217 +++++++++++++++++- 3 files changed, 259 insertions(+), 40 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/IncreaseCustomerButtonView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/IncreaseCustomerButtonView.cs index 9dc15754..16c4ecc7 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/IncreaseCustomerButtonView.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/IncreaseCustomerButtonView.cs @@ -12,17 +12,36 @@ namespace MyGame.Scenes.marketing.Scripts [SerializeField] private GameObject DisableObject; [SerializeField] private Text remainTimeText; public IObservable RewardButton => rewardButton.OnClickAsObservable().TakeUntilDestroy(this); + private IDisposable timerDisposable; - public void SetButtonActive(bool active) + private void SetButtonActive(bool active) { rewardButton.gameObject.SetActive(active); DisableObject.SetActive(!active); } - public void SetTime(int seconds) + private void SetTime(int seconds) { seconds = Mathf.Max(0, seconds); remainTimeText.text = string.Format(remainTimeFormat, seconds / 60, seconds % 60); } + + public void ResetTimer(int time) + { + // タイマーの更新処理 + timerDisposable?.Dispose(); + SetButtonActive(time <= 0); + SetTime(time); + timerDisposable = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1f)) + .Select(x => (int)(time - x)) + .TakeWhile(x => x > 0) + .Subscribe(x => + { + SetTime(x); + }, () => + { + SetButtonActive(true); + }).AddTo(this); + } } } \ No newline at end of file diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 3587ca73..d6e9abb0 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -26,13 +26,15 @@ public class MarketManager : MonoBehaviour private Market market; List productDataList; - private readonly Subject resetRefreshTimer = new Subject(); + private readonly Subject customerRewardTimerUpdateSubject = new Subject(); + private readonly Subject vipTimerUpdateSubject = new Subject(); private readonly CompositeDisposable ShopClosedCompositeDisposable = new CompositeDisposable(); private void Start() { ShopClosedCompositeDisposable.AddTo(this); - resetRefreshTimer.AddTo(this); + customerRewardTimerUpdateSubject.AddTo(this); + vipTimerUpdateSubject.AddTo(this); market = Market.Instance; SoundManager.Instance.PlayBGM("bgm_marketing"); @@ -69,7 +71,7 @@ public class MarketManager : MonoBehaviour gameData.FinishTutorial(); GameDataManager.SaveGameData(); walkerMask.gameObject.SetActive(false); - resetRefreshTimer.OnNext(Unit.Default); + customerRewardTimerUpdateSubject.OnNext(Unit.Default); rewardButtonView.gameObject.SetActive(true); }).AddTo(controller).AddTo(this); }); @@ -121,49 +123,54 @@ public class MarketManager : MonoBehaviour gameData.increaseCustomerTime = DateTime.UtcNow.AddSeconds(10).ToBinary(); #endif GameDataManager.SaveGameData(); - resetRefreshTimer.OnNext(Unit.Default); + customerRewardTimerUpdateSubject.OnNext(Unit.Default); }); }).AddTo(this); - - vipCustomerButtonView.ShowButton(); + + // VIP宣伝ボタン vipCustomerButtonView.VipButton.ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ => { GetRewardDialog.ShowVipCustomerDialog(() => { - + market.VipAction(); + }, () => + { + // 現在時刻に設定して期限切れにする + gameData.vipCustomerLimitTime = DateTime.UtcNow.ToBinary(); + vipTimerUpdateSubject.OnNext(Unit.Default); }); }).AddTo(this); - + // onNextをトリガーに実行 - IDisposable timerDisposable = null; - resetRefreshTimer + customerRewardTimerUpdateSubject .Select(_ => (int) DateTime.FromBinary(gameData.increaseCustomerTime).Subtract(DateTime.UtcNow).TotalSeconds) .Subscribe(time => { - // タイマーの更新処理 - timerDisposable?.Dispose(); - rewardButtonView.SetButtonActive(time <= 0); - rewardButtonView.SetTime(time); - timerDisposable = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1f)) - .Select(x => (int)(time - x)) - .TakeWhile(x => x > 0) - .Subscribe(x => - { - rewardButtonView.SetTime(x); - }, () => - { - rewardButtonView.SetButtonActive(true); - }).AddTo(this); + rewardButtonView.ResetTimer(time); }).AddTo(this); - resetRefreshTimer.OnNext(Unit.Default); + if (DateTime.FromBinary(gameData.vipCustomerLimitTime) >= DateTime.UtcNow) + { + vipCustomerButtonView.ShowButton(gameData.vipCustomerFirstOpen); + gameData.vipCustomerFirstOpen = false; + vipTimerUpdateSubject + .Select(_ => (int) DateTime.FromBinary(gameData.vipCustomerLimitTime).Subtract(DateTime.UtcNow).TotalSeconds) + .Subscribe(time => + { + vipCustomerButtonView.ResetTimer(time); + }).AddTo(this); + } + + customerRewardTimerUpdateSubject.OnNext(Unit.Default); + vipTimerUpdateSubject.OnNext(Unit.Default); // アプリ復帰時に残り時間更新 Observable.EveryApplicationPause() .Where(pause => !pause) .Subscribe(_ => { - resetRefreshTimer.OnNext(Unit.Default); + customerRewardTimerUpdateSubject.OnNext(Unit.Default); + vipTimerUpdateSubject.OnNext(Unit.Default); }).AddTo(this); market.IsPromotion.Subscribe(active => diff --git a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity index 8bc3f449..10936004 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity @@ -702,6 +702,36 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &172087639 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 172087640} + m_Layer: 0 + m_Name: StayPos + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &172087640 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172087639} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.71, y: -2.1827226, z: 0} + m_LocalScale: {x: 0.9, y: 0.9, z: 0.9} + m_Children: [] + m_Father: {fileID: 2017358937} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &183110189 GameObject: m_ObjectHideFlags: 0 @@ -2908,6 +2938,8 @@ MonoBehaviour: walkerInterval: 10 adWalkerDuration: 60 adWalkerCount: 20 + vipCustomerCount: 6 + vipCustomerInterval: 5 tastingCustomerInterval: 5 --- !u!114 &658817262 MonoBehaviour: @@ -2994,7 +3026,7 @@ Transform: m_Children: - {fileID: 1717315656} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &668553842 GameObject: @@ -3717,8 +3749,33 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: e644184ee7cac4454a2ebc1fc479ecb4, + objectReference: {fileID: 21300000, guid: 88b678672e5bca548bedbae7386e4346, type: 3} + - target: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: vipMoveSpeed + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: customerDirection + value: + objectReference: {fileID: 985747657} + - target: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: vipCustomerAnimator + value: + objectReference: {fileID: 985747656} + - target: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: vipStayPosTransform + value: + objectReference: {fileID: 172087640} + - target: {fileID: 512143980313251866, guid: caaa748dbeed576499e8cae74d33f689, + type: 3} + propertyPath: vipSpeechBubbleObject + value: + objectReference: {fileID: 985747654} - target: {fileID: 1174152333972670060, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_fontColor.a @@ -3817,12 +3874,12 @@ PrefabInstance: - target: {fileID: 1408184404978035950, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 8 + value: 7 objectReference: {fileID: 0} - target: {fileID: 1909038109161790577, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_RootOrder - value: 7 + value: 8 objectReference: {fileID: 0} - target: {fileID: 1913713732571476837, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -3853,13 +3910,13 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: 3e8106fd24f7946e2a20ebd081ebb0b9, + objectReference: {fileID: 21300000, guid: 401e6b14583a46443be3b7124b78ac09, type: 3} - target: {fileID: 3664916832434116137, guid: caaa748dbeed576499e8cae74d33f689, type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: dab0cd6adf1694bd6b96c224ad8c38e6, + objectReference: {fileID: 21300000, guid: e8fb21ace44c3e748959b969f895dd23, type: 3} - target: {fileID: 3664916832512110618, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -4010,7 +4067,7 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: 0469694e83769479fa737c3a3b9f6b06, + objectReference: {fileID: 21300000, guid: 0a13c07b1bd21434d801188fb9b7546d, type: 3} - target: {fileID: 3664916832825273575, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -4051,7 +4108,7 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: afb06cd566c9b4c0eba30dd082477478, + objectReference: {fileID: 21300000, guid: 7597f863b51829447a8afd00534fe6e4, type: 3} - target: {fileID: 3664916834267713207, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -4117,7 +4174,7 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: b128a700ffcf24ec29e2a2ce7af50858, + objectReference: {fileID: 21300000, guid: 3be9a3bcc8d7c864a97b5be41e33418f, type: 3} - target: {fileID: 8591874021033984247, guid: caaa748dbeed576499e8cae74d33f689, type: 3} @@ -4878,7 +4935,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &876376901 GameObject: @@ -5403,6 +5460,110 @@ SortingGroup: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 3 +--- !u!1001 &985747653 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2017358937} + m_Modifications: + - target: {fileID: 5353524989891006842, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalPosition.x + value: -10.0789995 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalPosition.y + value: -2.1827226 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalPosition.z + value: -35.82837 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8476357288433061819, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + propertyPath: m_Name + value: customer_Luxury_Gray + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cd3da4efffd34614794276964fca59c7, type: 3} +--- !u!1 &985747654 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6877570175858391367, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + m_PrefabInstance: {fileID: 985747653} + m_PrefabAsset: {fileID: 0} +--- !u!4 &985747655 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8476357288433061812, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + m_PrefabInstance: {fileID: 985747653} + m_PrefabAsset: {fileID: 0} +--- !u!95 &985747656 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 8476357288433061813, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + m_PrefabInstance: {fileID: 985747653} + m_PrefabAsset: {fileID: 0} +--- !u!114 &985747657 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 9067878707261228985, guid: cd3da4efffd34614794276964fca59c7, + type: 3} + m_PrefabInstance: {fileID: 985747653} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0eb44b30c9454383898faae0c3666b94, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &990563154 GameObject: m_ObjectHideFlags: 0 @@ -5727,7 +5888,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1025201118 MonoBehaviour: @@ -19798,6 +19959,38 @@ Transform: type: 3} m_PrefabInstance: {fileID: 2011193247} m_PrefabAsset: {fileID: 0} +--- !u!1 &2017358936 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017358937} + m_Layer: 0 + m_Name: VipReward + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2017358937 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017358936} + 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_Children: + - {fileID: 172087640} + - {fileID: 985747655} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2031857953 GameObject: m_ObjectHideFlags: 0 @@ -25109,7 +25302,7 @@ PrefabInstance: - target: {fileID: 3667080857874733261, guid: b875e6e94a97840ca8490ce0718fca6e, type: 3} propertyPath: m_RootOrder - value: 8 + value: 9 objectReference: {fileID: 0} - target: {fileID: 3667080857874733261, guid: b875e6e94a97840ca8490ce0718fca6e, type: 3} From 86baca721c6057651e8b2ed218bbed1257f6bbdd Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 19:39:44 +0900 Subject: [PATCH 11/12] =?UTF-8?q?=E8=A4=87=E6=95=B0=E3=81=8A=E5=AE=A2?= =?UTF-8?q?=E3=81=95=E3=82=93=E3=82=BF=E3=82=A4=E3=83=97=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/Title/Scripts/Title.cs | 2 +- .../Scenes/marketing/Scripts/CustomerFlow.cs | 29 +++++++++------- .../marketing/Scripts/CustomerSetting.cs | 20 +++++++---- .../MyGame/Scenes/marketing/Scripts/Market.cs | 33 ++++++++++++++----- 4 files changed, 57 insertions(+), 27 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs b/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs index 2e1d0a4a..7f1fc289 100644 --- a/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs +++ b/popcorn/Assets/MyGame/Scenes/Title/Scripts/Title.cs @@ -46,7 +46,7 @@ public class Title : MonoBehaviour .Subscribe(t => { // 一般客orセレブ - var (isSpecial, orderCount) = Market.Instance.GetCustomerData(false); + var (isSpecial, orderCount) = Market.Instance.GetCustomerData(CustomerType.Walker); // 複数パターンある場合ChooseRandom var prefab = isSpecial ? customerData.ChooseSpecialPrefab() : customerData.ChooseNormalPrefab(); diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs index fe48a028..2b7f8321 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerFlow.cs @@ -3,15 +3,22 @@ using System.Linq; using UniRx; using UnityEngine; +public enum CustomerType +{ + Walker, + Customer, + Vip +} + public class CustomerFlow : MonoBehaviour { - private IObservable customerObservable; - private IObservable walkerObservable; - private IObservable adWalkerObservable; + private IObservable customerObservable; + private IObservable walkerObservable; + private IObservable adWalkerObservable; private readonly Subject> adStartObservable = new Subject>(); - private IObservable vipCustomerObservable; + private IObservable vipCustomerObservable; private readonly Subject> vipCustomerSubject = new Subject>(); - private IObservable tastingCustomerObservable; + private IObservable tastingCustomerObservable; private static readonly float checkHeartInterval = 1f; [Header("1分間あたりの歩行者数")] @@ -33,7 +40,7 @@ public class CustomerFlow : MonoBehaviour public float TastingCustomerInterval => tastingCustomerInterval; private int adActiveCount = 0; - public IObservable Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, vipCustomerObservable, tastingCustomerObservable); + public IObservable Flow => walkerObservable.Merge(customerObservable, adWalkerObservable, vipCustomerObservable, tastingCustomerObservable); private void Awake() { @@ -58,18 +65,18 @@ public class CustomerFlow : MonoBehaviour .Select(customerInterval => Observable.Interval(TimeSpan.FromSeconds(customerInterval))) .Switch() // .Do(_ => Debug.Log($"customer:{GetHashCode()}")) - .Select(_ => true); + .Select(_ => CustomerType.Customer); // 歩行者出現頻度、立ち止まり確率も設定(歩行者タイマー1分間に6人 walkerObservable = Observable.Interval(TimeSpan.FromSeconds(walkerInterval)) // .Do(l => Debug.Log($"walker:{GetHashCode()}")) - .Select(x => false); + .Select(_ => CustomerType.Walker); // 宣伝時、タップすると60秒だけ稼働するストリーム adWalkerObservable = adStartObservable .Switch() // .Do(_ => Debug.Log($"adWalker:{GetHashCode()}")) - .Select(_ => false); + .Select(_ => CustomerType.Walker); #if DEVELOPMENT_BUILD || UNITY_EDITOR if (UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugManyWalker", false)) { @@ -80,7 +87,7 @@ public class CustomerFlow : MonoBehaviour // VIP宣伝 vipCustomerObservable = vipCustomerSubject .Switch() - .Select(_ => true); + .Select(_ => CustomerType.Vip); // 試食 // tastingCustomerInterval毎にTastingCountを確認 @@ -97,7 +104,7 @@ public class CustomerFlow : MonoBehaviour }); tastingCustomerObservable = tastingTimer // .Do(_ => Debug.Log($"tastingCustomer remain:{GameDataManager.GameData.TastingCount}")) - .Select(_ => true); + .Select(_ => CustomerType.Customer); } public void StartAdWalker(Action onComplete = null) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs index 504d2d4c..4e145da0 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerSetting.cs @@ -1,5 +1,7 @@ +using System; using System.Linq; using UnityEngine; +using Random = UnityEngine.Random; namespace MyGame.Scenes.marketing.Scripts { @@ -18,13 +20,19 @@ namespace MyGame.Scenes.marketing.Scripts (0, 5f), }; - public (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer) + public (bool isSpecial, int orderCount) GetCustomerData (CustomerType customerType) { - var specialRate = isCustomer ? walkerSpecialRate : customerSpecialRate; - var isSpecial = Random.value < specialRate; - - // セレブは5個購入固定 - return isSpecial ? (true, specialOrderCount) : (false, GetOrderCount()); + switch (customerType) + { + case CustomerType.Walker: + return Random.value < walkerSpecialRate ? (true, specialOrderCount) : (false, GetOrderCount()); + case CustomerType.Customer: + return Random.value < customerSpecialRate ? (true, specialOrderCount) : (false, GetOrderCount()); + case CustomerType.Vip: + return (true, specialOrderCount); + default: + throw new ArgumentOutOfRangeException(nameof(customerType), customerType, null); + } } // お客さん出現パターン確率計算と行動パターン計算 diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs index 699bf550..2ac78b1f 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/Market.cs @@ -285,7 +285,7 @@ public class Market : SingletonMonoBehaviour }).AddTo(this); // 客湧き - customerFlow.Flow.Subscribe(isCustomer => + customerFlow.Flow.Subscribe(customerType => { if (IsPause.Value) { @@ -298,17 +298,32 @@ public class Market : SingletonMonoBehaviour return; } // 一般客orセレブ - var (isSpecial, orderCount) = GetCustomerData(isCustomer); + CustomerState customerState; - // 複数パターンある場合ChooseRandom - var prefab = isSpecial ? customerData.ChooseSpecialPrefab() : customerData.ChooseNormalPrefab(); + switch (customerType) + { + case CustomerType.Walker: + customerState = CustomerState.Walk; + break; + case CustomerType.Customer: + customerState = CustomerState.WalkShop; + break; + case CustomerType.Vip: + customerState = CustomerState.WalkShop; + break; + default: + throw new ArgumentOutOfRangeException(nameof(customerType), customerType, null); + } + + var (isSpecial, orderCount) = GetCustomerData(customerType); var customerController = SpawnCustomer(); customerController.Setup(orderPosisionObject.transform.GetComponentsInChildren().ToList().Skip(1).ToList()); + customerController.ChangeCustomerState(customerState); + // 複数パターンある場合ChooseRandom + customerController.CustomerPrefab = isSpecial ? customerData.ChooseSpecialPrefab() : customerData.ChooseNormalPrefab(); customerController.OrderCount = orderCount; - customerController.CustomerPrefab = prefab; customerControllerList.Add(customerController); - - customerController.ChangeCustomerState(isCustomer ? CustomerState.WalkShop : CustomerState.Walk); + customerController.TappedObservable .Take(1) .Subscribe(_ => @@ -355,9 +370,9 @@ public class Market : SingletonMonoBehaviour } - public (bool isSpecial, int orderCount) GetCustomerData (bool isCustomer) + public (bool isSpecial, int orderCount) GetCustomerData (CustomerType customerType) { - return customerSetting.GetCustomerData(isCustomer); + return customerSetting.GetCustomerData(customerType); } private CustomerController SpawnCustomer() From 385f26a30077083c2d3298813a6c4b308df33c6e Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 4 Feb 2022 19:40:03 +0900 Subject: [PATCH 12/12] =?UTF-8?q?Vip=E5=AE=A3=E4=BC=9D=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/marketing/Scripts/MarketManager.cs | 3 +++ .../Scenes/marketing/Scripts/VipCustomerButtonView.cs | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index d6e9abb0..423bcb64 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -133,6 +133,9 @@ public class MarketManager : MonoBehaviour GetRewardDialog.ShowVipCustomerDialog(() => { market.VipAction(); + // 現在時刻に設定して期限切れにする + gameData.vipCustomerLimitTime = DateTime.UtcNow.ToBinary(); + vipTimerUpdateSubject.OnNext(Unit.Default); }, () => { // 現在時刻に設定して期限切れにする diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs index ccd7168f..6678b749 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/VipCustomerButtonView.cs @@ -17,6 +17,7 @@ namespace MyGame.Scenes.marketing.Scripts [SerializeField] private float vipMoveSpeed; public IObservable VipButton { get; private set; } private IDisposable timerDisposable; + private IDisposable moveDisposable; private Vector3 initialPos; private void Awake() @@ -43,7 +44,8 @@ namespace MyGame.Scenes.marketing.Scripts vipCustomerAnimator.speed = 1f; vipCustomerAnimator.Play("customer_nomal_walk_side"); var vipTransform = vipCustomerAnimator.transform; - this.UpdateAsObservable() + moveDisposable?.Dispose(); + moveDisposable = this.UpdateAsObservable() .TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, vipStayPosTransform.localPosition) > .01f) .Subscribe(_ => { @@ -75,7 +77,8 @@ namespace MyGame.Scenes.marketing.Scripts vipCustomerAnimator.Play("customer_nomal_walk_side"); vipButton.transform.SetLocalScale(0f); var vipTransform = vipCustomerAnimator.transform; - this.UpdateAsObservable() + moveDisposable?.Dispose(); + moveDisposable = this.UpdateAsObservable() .TakeWhile(_ => Vector2.Distance(vipTransform.localPosition, initialPos) > .01f) .Subscribe(_ => {