diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs index 778ba87c..7aa5848b 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Pan.cs @@ -1,21 +1,18 @@ using System; using UnityEngine; -namespace MyGame.Scenes.Main +public class Pan : MonoBehaviour { - public class Pan : MonoBehaviour - { - [SerializeField] private PanController controller; - [SerializeField] private float thrust; + [SerializeField] private PanController controller; + [SerializeField] private float thrust; - private void OnTriggerStay2D(Collider2D other) - { - // Debug.Log(controller.Direction); - // 移動量が少ないときは動かない - // if (controller.Delta.magnitude >= 1f) Debug.Log(controller.Delta.magnitude); - var direct = 1f; - direct = controller.Delta.magnitude < 0.1f ? 0 : 1; - other.attachedRigidbody.AddForce(controller.Delta * thrust * direct, ForceMode2D.Impulse); - } + private void OnTriggerStay2D(Collider2D other) + { + // Debug.Log(controller.Direction); + // 移動量が少ないときは動かない + // if (controller.Delta.magnitude >= 1f) Debug.Log(controller.Delta.magnitude); + var direct = 1f; + direct = controller.Delta.magnitude < 0.1f ? 0 : 1; + other.attachedRigidbody.AddForce(controller.Delta * thrust * direct, ForceMode2D.Impulse); } } \ No newline at end of file