diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_GreatSuccess.png b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_GreatSuccess.png index 36958c20..8afc1871 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_GreatSuccess.png and b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_GreatSuccess.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_failure.png b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_failure.png index bffe67f1..2e9e0758 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_failure.png and b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_failure.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_success.png b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_success.png index a02120b4..04167b24 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_success.png and b/popcorn/Assets/MyGame/Resource/UI/ui_cooking_rogo_success.png differ diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity index 82e91f97..5ae7c855 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity @@ -1106,7 +1106,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 588, y: 94} + m_SizeDelta: {x: 886.2, y: 94} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &649269358 MonoBehaviour: @@ -2012,8 +2012,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: -233, y: 0} - m_SizeDelta: {x: 186, y: 74} + m_AnchoredPosition: {x: 9, y: 0} + m_SizeDelta: {x: 283.35593, y: 74} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1110039802 MonoBehaviour: @@ -2720,7 +2720,7 @@ GameObject: m_Component: - component: {fileID: 1448897407} m_Layer: 0 - m_Name: ' cooking' + m_Name: cooking m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2779,8 +2779,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: 235.00748, y: 0} - m_SizeDelta: {x: 196.1, y: 74} + m_AnchoredPosition: {x: -9, y: 0} + m_SizeDelta: {x: 293.45596, y: 74} m_Pivot: {x: 1, y: 0.5} --- !u!114 &1488490347 MonoBehaviour: @@ -7866,7 +7866,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -488, y: 100} + m_SizeDelta: {x: 0, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1759816007 GameObject: @@ -7900,10 +7900,10 @@ RectTransform: m_Father: {fileID: 1693325335} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 500.98572, y: 74} + m_SizeDelta: {x: -100, y: 74} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1759816009 MonoBehaviour: @@ -8013,7 +8013,7 @@ MonoBehaviour: temperature: 0 temperatureSpeed: 0 panSpeed: 0 - panFactor: 0.18 + panFactor: 0.21 deadZone: 0.05 baseIncreaseSpeed: 0.12 hotIncreaseSpeed: 0.16 @@ -8035,12 +8035,12 @@ MonoBehaviour: cornSpawnTarget: {fileID: 1440136003} cornPrefab: {fileID: 5499754490129207122, guid: 2b790fd908bd14de4a601c21374fb55b, type: 3} - cornSpawnCount: 120 + cornSpawnCount: 100 maxFailedCornCount: 70 baseGrowSpeed: 1 - hotGrowSpeed: 1.4 - baseCornPopTime: 10 - cornBurntDuration: 1 + hotGrowSpeed: 1.3 + baseCornPopTime: 8 + cornBurntDuration: 2 cornSpillSpeed: 50 cornPopSpeed: 30 --- !u!1 &1928679189 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab index ccbfec07..fdffb272 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab @@ -182,20 +182,20 @@ EdgeCollider2D: m_Offset: {x: 0, y: 0} m_EdgeRadius: 0.97 m_Points: - - {x: 0.08507648, y: 0.0029194644} - - {x: 0.07206042, y: -0.022326082} - - {x: 0.058265857, y: -0.033007056} - - {x: 0.014779479, y: -0.045253783} - - {x: -0.03, y: -0.042935647} - - {x: -0.06203778, y: -0.031388305} - - {x: -0.07575909, y: -0.0054834373} - - {x: -0.075847514, y: 0.011277042} - - {x: -0.06871115, y: 0.03187129} - - {x: -0.04411369, y: 0.046100065} - - {x: 0.00003663823, y: 0.052348673} - - {x: 0.045930877, y: 0.043994725} - - {x: 0.07751208, y: 0.023389027} - - {x: 0.08064145, y: -0.00019192172} + - {x: 0.07831237, y: 0.0019857544} + - {x: 0.067422844, y: -0.014939261} + - {x: 0.042848658, y: -0.02853989} + - {x: 0.012053529, y: -0.034262266} + - {x: -0.017736593, y: -0.032672953} + - {x: -0.045898944, y: -0.027976502} + - {x: -0.070550025, y: -0.009321351} + - {x: -0.069629475, y: 0.013734227} + - {x: -0.05853144, y: 0.03040389} + - {x: -0.03551537, y: 0.041977994} + - {x: 0.00234731, y: 0.047424417} + - {x: 0.03879649, y: 0.04175444} + - {x: 0.06509021, y: 0.026449163} + - {x: 0.075699374, y: 0.010230324} --- !u!1 &6031284905392100201 GameObject: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab index 4dadd602..d65d2e1f 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab @@ -112,7 +112,7 @@ CircleCollider2D: m_UsedByComposite: 0 m_Offset: {x: 0, y: 0} serializedVersion: 2 - m_Radius: 0.16 + m_Radius: 0.18 --- !u!1 &3431194784518736845 GameObject: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs index d2b3c0fb..b6799818 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs @@ -35,6 +35,8 @@ public class Corn : MonoBehaviour private float cornGrowSpeed; private float cornSpillSpeed; private float cornPopSpeed; + + private float worldWidth; public IReadOnlyReactiveProperty Condition => condition; private readonly ReactiveProperty condition = new ReactiveProperty(CornCondition.Seed); @@ -52,6 +54,9 @@ public class Corn : MonoBehaviour spriteTransform = spriteRenderer.transform; rotationResolverTransform = spriteTransform.parent.parent; + + var rightTop = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0)); + worldWidth = rightTop.x; } private void Start() @@ -67,9 +72,9 @@ public class Corn : MonoBehaviour condition.Value = CornCondition.Spilled; }).AddTo(this); - condition.Subscribe(x => + condition.Pairwise().Subscribe(x => { - switch (x) + switch (x.Current) { case CornCondition.Seed: break; @@ -80,7 +85,7 @@ public class Corn : MonoBehaviour CornBurnt(); break; case CornCondition.Spilled: - CornSpilled(); + CornSpilled(x.Previous); break; default: throw new ArgumentOutOfRangeException(nameof(x), x, null); @@ -129,14 +134,41 @@ public class Corn : MonoBehaviour Instantiate(effectBurnt, transform); } - private void CornSpilled() + private void CornSpilled(CornCondition prevCondition) { GetComponent().enabled = false; + // フライパンに追従しないようにparent解除 + transform.parent = null; + + Observable.Timer(TimeSpan.FromSeconds(Random.Range(.5f, .9f))).Subscribe(_ => + { + Destroy(gameObject); + switch (prevCondition) + { + case CornCondition.Seed: + VibrationManager.Instance.PlayVibrationOnce(); + break; + case CornCondition.Simple: + case CornCondition.Burnt: + // 画面KO再生(同時飛び出し時ランダム) + var animation = Instantiate(spilledCornAnimationPrefab, new Vector2(Random.value * worldWidth * 2 - worldWidth, Random.value * 2 * 2 - 2), Quaternion.identity); + VibrationManager.Instance.PlayVibrationOnce(); + Observable.Timer(TimeSpan.FromSeconds(1.5f)).Subscribe(__ => + { + Destroy(animation); + }); + break; + case CornCondition.Spilled: + break; + default: + throw new ArgumentOutOfRangeException(nameof(prevCondition), prevCondition, null); + } + }).AddTo(this); } public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed) { - cornPopTime = popTime + Random.Range(0, 2f); + cornPopTime = popTime + Random.Range(0, 5f); cornBurntTime = cornPopTime + burntDuration + Random.Range(0, 1f); cornSpillSpeed = spillSpeed; cornPopSpeed = popSpeed; diff --git a/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity b/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity index c1cf185a..d8829651 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity +++ b/popcorn/Assets/MyGame/Scenes/CornField/CornField.unity @@ -988,138 +988,12 @@ Camera: type: 3} m_PrefabInstance: {fileID: 1226867710} m_PrefabAsset: {fileID: 0} ---- !u!1 &1237701159 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1237701160} - - component: {fileID: 1237701161} - - component: {fileID: 1237701162} - m_Layer: 0 - m_Name: com_growth - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1237701160 +--- !u!4 &1425125887 stripped Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + m_PrefabInstance: {fileID: 8524901521126273002} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237701159} - 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: [] - m_Father: {fileID: 1425125887} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1237701161 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237701159} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 25 - m_Sprite: {fileID: 21300000, guid: 1dbb30abe096f134fade3bf0e41796c6, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1.32, y: 2.32} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!95 &1237701162 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237701159} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 37787d119ee84fa4ab783958486e54da, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!1 &1425125886 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1425125887} - m_Layer: 0 - m_Name: corn_harvest - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1425125887 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1425125886} - 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: 1237701160} - m_Father: {fileID: 1501215306} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1466604290 PrefabInstance: m_ObjectHideFlags: 0 @@ -1706,3 +1580,72 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 90ea860c4ec589d4aab99bfc127949f4, type: 3} +--- !u!1001 &8524901521126273002 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1501215306} + m_Modifications: + - target: {fileID: 8524901521850801684, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_Name + value: corn_harvest + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e642499b3643dab4ba05b02e8c6bde1c, type: 3}