diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab index fdffb272..ff6f35b1 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/Pan.prefab @@ -63,7 +63,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 3218397595738205000} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1453251556405238011 MonoBehaviour: @@ -79,6 +79,7 @@ MonoBehaviour: m_EditorClassIdentifier: controller: {fileID: 0} thrust: 3 + deadZone: 0.1 --- !u!61 &4983801824205239738 BoxCollider2D: m_ObjectHideFlags: 0 @@ -151,7 +152,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1453251557352552632 Transform: m_ObjectHideFlags: 0 @@ -224,10 +225,72 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1453251557352552632} + - {fileID: 746482762447314123} - {fileID: 1453251556405238013} m_Father: {fileID: 1453251556377932393} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7676003050359771459 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 746482762447314123} + - component: {fileID: 5865392566938846288} + m_Layer: 0 + m_Name: PanEdge (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &746482762447314123 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7676003050359771459} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.38, y: -0.78, z: 0} + m_LocalScale: {x: 102.03828, y: 110.093575, z: 85.63402} + m_Children: [] + m_Father: {fileID: 3218397595738205000} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!68 &5865392566938846288 +EdgeCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7676003050359771459} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 6200000, guid: 440db2e8ae6ea41b792d56600b0532f3, type: 2} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_EdgeRadius: 2.61 + m_Points: + - {x: 0.07831237, y: 0.0019857544} + - {x: 0.0508193, y: -0.020667206} + - {x: 0.035089638, y: -0.028409138} + - {x: 0.012053529, y: -0.034262266} + - {x: -0.017523682, y: -0.031982258} + - {x: -0.04153408, y: -0.023042984} + - {x: -0.060010493, y: -0.009420026} + - {x: -0.06249666, y: 0.008998046} + - {x: -0.051591836, y: 0.025973067} + - {x: -0.027804706, y: 0.042549714} + - {x: 0.0025015222, y: 0.04699563} + - {x: 0.038333848, y: 0.04032514} + - {x: 0.058061335, y: 0.025281195} + - {x: 0.06824917, y: 0.0029303213} --- !u!1001 &1554886823952308219 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab index d8ba372f..526319c9 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Prefabs/corn.prefab @@ -94,7 +94,7 @@ Rigidbody2D: m_AngularDrag: 2 m_GravityScale: 0 m_Material: {fileID: 6200000, guid: 1e68e56cd6ac4484ba25eb760e0d3057, type: 2} - m_Interpolate: 0 + m_Interpolate: 2 m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs index 6fbe7c69..3b8317d0 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs @@ -14,6 +14,11 @@ public class Pan : MonoBehaviour { return; } + // コーンの壁抜けを抑制 + if (controller.Velocity.magnitude >= 200f) + { + return; + } other.attachedRigidbody.AddForce(controller.Velocity * thrust, ForceMode2D.Impulse); } } \ No newline at end of file