From 891f8c42e0c0219a516cb54ea2c52788bcc177b8 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 27 Aug 2021 11:47:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=8F=E3=83=BC=E3=83=88=E6=BC=94?= =?UTF-8?q?=E5=87=BA=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Resource/Animation/heart.anim | 120 +----------------- .../Resources/Avatars/customer_normal.prefab | 8 +- .../Scenes/marketing/Prefabs/Customer.prefab | 17 ++- .../marketing/Scripts/HeartAnimation.cs | 34 +++-- 4 files changed, 42 insertions(+), 137 deletions(-) diff --git a/popcorn/Assets/MyGame/Resource/Animation/heart.anim b/popcorn/Assets/MyGame/Resource/Animation/heart.anim index 36731de0..64c739c4 100644 --- a/popcorn/Assets/MyGame/Resource/Animation/heart.anim +++ b/popcorn/Assets/MyGame/Resource/Animation/heart.anim @@ -14,32 +14,7 @@ AnimationClip: m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: 0, y: 1.5, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.33333334 - value: {x: 0, y: 1.5, z: 0} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: + m_PositionCurves: [] m_ScaleCurves: - curve: serializedVersion: 2 @@ -135,13 +110,6 @@ AnimationClip: typeID: 212 customType: 0 isPPtrCurve: 0 - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 @@ -164,90 +132,6 @@ AnimationClip: m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1.5 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 1.5 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - curve: serializedVersion: 2 m_Curve: @@ -415,6 +299,6 @@ AnimationClip: classID: 212 script: {fileID: 0} m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 + m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] diff --git a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab index 611dde6f..983ba803 100644 --- a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab +++ b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 3958804368776631697} - component: {fileID: 4809398092723176810} - component: {fileID: 3534603063824972783} - m_Layer: 0 + m_Layer: 5 m_Name: SmallHeart m_TagString: Untagged m_Icon: {fileID: 0} @@ -55,7 +55,7 @@ ParticleSystem: startDelay: serializedVersion: 2 minMaxState: 0 - scalar: 1.8 + scalar: 0 minScalar: 0 maxCurve: serializedVersion: 2 @@ -7321,7 +7321,7 @@ GameObject: - component: {fileID: 3403812381271641660} - component: {fileID: 348776363784026289} - component: {fileID: 916899321649623190} - m_Layer: 0 + m_Layer: 5 m_Name: heart m_TagString: Untagged m_Icon: {fileID: 0} @@ -7381,7 +7381,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 30 + m_SortingOrder: 151 m_Sprite: {fileID: 21300000, guid: aa0bbe72fccf4f04392dd03aacaabec2, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Prefabs/Customer.prefab b/popcorn/Assets/MyGame/Scenes/marketing/Prefabs/Customer.prefab index 45020c15..5edcc36f 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Prefabs/Customer.prefab +++ b/popcorn/Assets/MyGame/Scenes/marketing/Prefabs/Customer.prefab @@ -55,7 +55,7 @@ MonoBehaviour: walkSideTopPos: -1.55 walkSideBottomPos: -6.5 stopPosision: 0 - stopPositionRange: 2 + stopPositionRange: 1 orderStayPositions: [] orderPosision: 0.5 waitOrderPosision: -0.6 @@ -73,7 +73,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 786931d1da2c4b1c8ce9519c9b3c32fd, type: 3} m_Name: m_EditorClassIdentifier: - heart: {fileID: 0} + bigHeart: {fileID: 7988005957398545984} + smallHeart: {fileID: 992423202615605163} target: {fileID: 0} --- !u!1001 &631677504613307640 PrefabInstance: @@ -200,3 +201,15 @@ SpriteRenderer: type: 3} m_PrefabInstance: {fileID: 631677504613307640} m_PrefabAsset: {fileID: 0} +--- !u!1 &7988005957398545984 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7358655632798716600, guid: db654393793a67d45a7d0b70a68b73a6, + type: 3} + m_PrefabInstance: {fileID: 631677504613307640} + m_PrefabAsset: {fileID: 0} +--- !u!1 &992423202615605163 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 360816779210449747, guid: db654393793a67d45a7d0b70a68b73a6, + type: 3} + m_PrefabInstance: {fileID: 631677504613307640} + m_PrefabAsset: {fileID: 0} diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/HeartAnimation.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/HeartAnimation.cs index 158693f0..5209d9c0 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/HeartAnimation.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/HeartAnimation.cs @@ -2,24 +2,32 @@ using UnityEngine; public class HeartAnimation : MonoBehaviour { - [SerializeField] private GameObject heart; + [SerializeField] private GameObject bigHeart; + [SerializeField] private GameObject smallHeart; [SerializeField] private Transform target; - + private float animationDelay = .3f; + private float animationDuration = .8f; + private float heartToMeterDuration = .5f; + private float destroyDeley = 2f; public void GetHeart() { - heart.SetActive(true); - this.CallWaitForSeconds(.35f, () => + smallHeart.SetActive(false); + this.CallWaitForSeconds(animationDelay, () => { - var cacheTransform = heart.transform; - var beginPos = heart.transform.position; - cacheTransform.parent = null; - this.CallLerp(.5f, f => + bigHeart.SetActive(true); + this.CallWaitForSeconds(animationDuration, () => { - cacheTransform.position = Vector3.Lerp(beginPos, target.position, f.EaseInQuadratic()); - }, () => - { - // 大きいハートアニメーションが再生しきったらハートメーターのレベルが書かれているところに飛んでいき - // 小さいハートのアニメーションが再生しきったら「Header」を消すのと同時にメーターが増える + var cacheTransform = bigHeart.transform; + var beginPos = cacheTransform.position; + cacheTransform.parent = null; + this.CallLerp(heartToMeterDuration, f => + { + cacheTransform.position = Vector3.Lerp(beginPos, target.position, f.EaseInQuadratic()); + }, () => + { + smallHeart.SetActive(true); + Destroy(bigHeart, destroyDeley); + }); }); }); } From 0079d522ada1fc35a3593fc95b03144b6cf85bae Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 27 Aug 2021 11:56:28 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=83=8F=E3=83=BC=E3=83=88=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab index 14f66246..983ba803 100644 --- a/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab +++ b/popcorn/Assets/MyGame/Resources/Avatars/customer_normal.prefab @@ -55,7 +55,7 @@ ParticleSystem: startDelay: serializedVersion: 2 minMaxState: 0 - scalar: 1 + scalar: 0 minScalar: 0 maxCurve: serializedVersion: 2