From 604fab7b4366b142fa4618b2318b5a3b67aa260f Mon Sep 17 00:00:00 2001 From: kimura Date: Thu, 13 Oct 2022 17:43:26 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=A4=E3=83=88=E5=90=9B=E3=81=AE?= =?UTF-8?q?=E5=BA=97=E8=88=97=E3=82=A2=E3=83=8B=E3=83=A1=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resource/Animation/NormalBody.controller | 25 ++++- .../Scenes/marketing/Scripts/MarketManager.cs | 14 ++- .../Scenes/marketing/Scripts/PartTimerView.cs | 19 +++- .../MyGame/Scenes/marketing/marketing.unity | 92 +++++++++++++++++-- 4 files changed, 137 insertions(+), 13 deletions(-) diff --git a/popcorn/Assets/MyGame/Resource/Animation/NormalBody.controller b/popcorn/Assets/MyGame/Resource/Animation/NormalBody.controller index b85751b1..da3eee45 100644 --- a/popcorn/Assets/MyGame/Resource/Animation/NormalBody.controller +++ b/popcorn/Assets/MyGame/Resource/Animation/NormalBody.controller @@ -152,6 +152,28 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 +--- !u!1101 &-5539978647771639783 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6717130038756975249} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 1 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1107 &-3557210042345114067 AnimatorStateMachine: serializedVersion: 6 @@ -379,7 +401,8 @@ AnimatorState: m_Name: customer_Employment_stay_front_sell m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -5539978647771639783} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 88790495..3a9eed3c 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -51,10 +51,14 @@ public class MarketManager : MonoBehaviour stockView = marketView.GetTarget(ShopCustomizeCategory.Category4).GetComponentInChildren(); stockView.SetTextActive(true); ShopCustomizeCoinManager.Instance.ChangeCoin(globalGameData.ShopCustomizeCoin); - + + // 最新の都市ではない場合、バイトが有効 + if (!market.IsLatestCity) + { + partTimerView.StartAnimation(isPartTimer); + } if (isPartTimer) { - partTimerView.StartAnimation(); rewardButtonView.gameObject.SetActive(false); vipCustomerButtonView.gameObject.SetActive(false); } @@ -144,10 +148,11 @@ public class MarketManager : MonoBehaviour market.IsPause.Subscribe(isPause => { vipCustomerButtonView.SetActive(isPause); - // 兄弟非表示 + // バイト君モードでは兄弟非表示 blueView.SetActive(!isPartTimer && !isPause); BrotherPinkView.Instance.SetActive(!isPartTimer && !isPause); - partTimerView.SetActive(isPartTimer && !isPause); + // 最新の都市ではない場合バイト非表示 + partTimerView.SetActive(!market.IsLatestCity && !isPause); }).AddTo(this); // 宣伝ボタン @@ -234,6 +239,7 @@ public class MarketManager : MonoBehaviour { // コイン獲得エフェクト blueView.SellAction(); + partTimerView.SellAnimation(); if (coin == 0) return; CoinEffect(coin, pos => { diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/PartTimerView.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/PartTimerView.cs index 55389662..d6da0729 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/PartTimerView.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/PartTimerView.cs @@ -5,6 +5,9 @@ namespace MyGame.Scenes.marketing.Scripts public class PartTimerView : MonoBehaviour { [SerializeField] private Animator partTimerAnimator; + [SerializeField] private Transform frontPos; + [SerializeField] private Transform shopPos; + private bool isPartTimer; public void SetActive(bool active) { @@ -12,9 +15,23 @@ namespace MyGame.Scenes.marketing.Scripts partTimerAnimator.transform.SetLocalScale(active ? 1f : 0f); } - public void StartAnimation() + public void StartAnimation(bool isPartTimerMode) { + isPartTimer = isPartTimerMode; + if (isPartTimerMode) + { + partTimerAnimator.transform.SetParent(shopPos, false); + partTimerAnimator.Play("customer_Employment_stay_front"); + return; + } + partTimerAnimator.transform.SetParent(frontPos, false); partTimerAnimator.Play("customer_Employment_stay_front_Flyer"); } + + public void SellAnimation() + { + if (!isPartTimer) return; + partTimerAnimator.Play("customer_Employment_stay_front_sell"); + } } } \ No newline at end of file diff --git a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity index 021a8729..a5fc088d 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity +++ b/popcorn/Assets/MyGame/Scenes/marketing/marketing.unity @@ -677,7 +677,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1930145618} + m_TransformParent: {fileID: 1312496084} m_Modifications: - target: {fileID: 3318268871473007408, guid: 00e0cbb85389d424f9f75bbd5db123a8, type: 3} @@ -707,17 +707,17 @@ PrefabInstance: - target: {fileID: 3318268871473007408, guid: 00e0cbb85389d424f9f75bbd5db123a8, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 3318268871473007408, guid: 00e0cbb85389d424f9f75bbd5db123a8, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 3318268871473007408, guid: 00e0cbb85389d424f9f75bbd5db123a8, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 3318268871473007408, guid: 00e0cbb85389d424f9f75bbd5db123a8, type: 3} @@ -3520,6 +3520,49 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &1078117065 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1078117066} + - component: {fileID: 1078117067} + m_Layer: 0 + m_Name: shop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1078117066 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1078117065} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 2.81, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1930145618} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!210 &1078117067 +SortingGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1078117065} + m_Enabled: 1 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 --- !u!1 &1108075961 GameObject: m_ObjectHideFlags: 0 @@ -4119,6 +4162,38 @@ Transform: m_Father: {fileID: 443832894} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1312496083 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1312496084} + m_Layer: 0 + m_Name: front + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1312496084 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1312496083} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -5.1, y: -0.07, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 284617222} + m_Father: {fileID: 1930145618} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1384972636 GameObject: m_ObjectHideFlags: 0 @@ -15234,12 +15309,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1930145617} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -5.1, y: -0.07, z: 0} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 284617222} + - {fileID: 1312496084} + - {fileID: 1078117066} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -15256,6 +15332,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: partTimerAnimator: {fileID: 284617223} + frontPos: {fileID: 1312496084} + shopPos: {fileID: 1078117066} --- !u!1 &2017358936 GameObject: m_ObjectHideFlags: 0