diff --git a/popcorn/Assets/MyGame/Scenes/MiniGame/MiniGame.unity b/popcorn/Assets/MyGame/Scenes/MiniGame/MiniGame.unity index 3e10fda0..0ebcfd37 100644 --- a/popcorn/Assets/MyGame/Scenes/MiniGame/MiniGame.unity +++ b/popcorn/Assets/MyGame/Scenes/MiniGame/MiniGame.unity @@ -1006,7 +1006,7 @@ PrefabInstance: - target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028, type: 3} propertyPath: fallLimit - value: -7.59 + value: -6 objectReference: {fileID: 0} - target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/GameManager.cs b/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/GameManager.cs index 1c1c52df..af8bc459 100644 --- a/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/GameManager.cs +++ b/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/GameManager.cs @@ -244,13 +244,16 @@ namespace MyGame.Scenes.MiniGame.Scripts { return; } + + var closestPoint = x.ClosestPoint(playerTransform.position); + x.enabled = false; #if UNITY_EDITOR if (isDebug) { var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); sphere.GetComponent().material.color = Color.red; sphere.transform.SetLocalScale(.4f); - sphere.transform.position = x.ClosestPoint(playerTransform.position); + sphere.transform.position = closestPoint; sphere.transform.SetPositionZ(-5f); // if (item.ItemType == StageItem.Type.Obstacle) // { @@ -264,12 +267,7 @@ namespace MyGame.Scenes.MiniGame.Scripts switch (item.ItemType) { case StageItem.Type.Obstacle: - if (player.IsHit) - { - return; - } - player.Hit(x.ClosestPoint(playerTransform.position)); - x.enabled = false; + player.Hit(closestPoint); break; case StageItem.Type.Item1: break;