落とし穴調整

This commit is contained in:
kimura 2022-07-26 09:31:24 +09:00
parent 19ff2494c7
commit 1c3496c2e4
2 changed files with 6 additions and 8 deletions

View File

@ -1006,7 +1006,7 @@ PrefabInstance:
- target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028, - target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028,
type: 3} type: 3}
propertyPath: fallLimit propertyPath: fallLimit
value: -7.59 value: -6
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028, - target: {fileID: 2607884839347368726, guid: acd6e6365b5fe4863aedc684a50b8028,
type: 3} type: 3}

View File

@ -244,13 +244,16 @@ namespace MyGame.Scenes.MiniGame.Scripts
{ {
return; return;
} }
var closestPoint = x.ClosestPoint(playerTransform.position);
x.enabled = false;
#if UNITY_EDITOR #if UNITY_EDITOR
if (isDebug) if (isDebug)
{ {
var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.GetComponent<MeshRenderer>().material.color = Color.red; sphere.GetComponent<MeshRenderer>().material.color = Color.red;
sphere.transform.SetLocalScale(.4f); sphere.transform.SetLocalScale(.4f);
sphere.transform.position = x.ClosestPoint(playerTransform.position); sphere.transform.position = closestPoint;
sphere.transform.SetPositionZ(-5f); sphere.transform.SetPositionZ(-5f);
// if (item.ItemType == StageItem.Type.Obstacle) // if (item.ItemType == StageItem.Type.Obstacle)
// { // {
@ -264,12 +267,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
switch (item.ItemType) switch (item.ItemType)
{ {
case StageItem.Type.Obstacle: case StageItem.Type.Obstacle:
if (player.IsHit) player.Hit(closestPoint);
{
return;
}
player.Hit(x.ClosestPoint(playerTransform.position));
x.enabled = false;
break; break;
case StageItem.Type.Item1: case StageItem.Type.Item1:
break; break;