|
@@ -716,17 +716,17 @@ public class PlayerController : MoveCharacter
|
|
|
if (leftDir.y < -0.5)
|
|
if (leftDir.y < -0.5)
|
|
|
{
|
|
{
|
|
|
Platform platform = foot.trigGroundList[0].GetComponent<Platform>();
|
|
Platform platform = foot.trigGroundList[0].GetComponent<Platform>();
|
|
|
- float plfy = platform.transform.position.y;
|
|
|
|
|
if (platform != null && platform.canDown)
|
|
if (platform != null && platform.canDown)
|
|
|
{
|
|
{
|
|
|
|
|
+ float plfy = platform.transform.position.y;
|
|
|
foot.trigGroundList.Remove(platform.gameObject);
|
|
foot.trigGroundList.Remove(platform.gameObject);
|
|
|
- }
|
|
|
|
|
- for (int i = foot.trigGroundList.Count - 1; i>=0 ;i--)
|
|
|
|
|
- {
|
|
|
|
|
- GameObject platformObj = foot.trigGroundList[i].gameObject;
|
|
|
|
|
- if(Mathf.Abs(platformObj.transform.position.y - plfy) <= platformVariance)
|
|
|
|
|
|
|
+ for (int i = foot.trigGroundList.Count - 1; i >= 0; i--)
|
|
|
{
|
|
{
|
|
|
- foot.trigGroundList.Remove(platformObj);
|
|
|
|
|
|
|
+ GameObject platformObj = foot.trigGroundList[i].gameObject;
|
|
|
|
|
+ if (Mathf.Abs(platformObj.transform.position.y - plfy) <= platformVariance)
|
|
|
|
|
+ {
|
|
|
|
|
+ foot.trigGroundList.Remove(platformObj);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|