バイト君の店舗アニメーション対応

This commit is contained in:
kimura 2022-10-13 17:43:26 +09:00
parent a1f2c9857f
commit 604fab7b43
4 changed files with 137 additions and 13 deletions

View File

@ -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

View File

@ -52,9 +52,13 @@ public class MarketManager : MonoBehaviour
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 =>
{

View File

@ -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");
}
}
}

View File

@ -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