|
@@ -12,7 +12,7 @@ public class Platform : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
Foot foot = other.GetComponent<Foot>();
|
|
Foot foot = other.GetComponent<Foot>();
|
|
|
- if (foot != null && foot.gameObject.layer != 8)
|
|
|
|
|
|
|
+ if (foot != null && foot.transform.parent.gameObject.layer != 8)
|
|
|
{
|
|
{
|
|
|
if (Mathf.Abs(foot.transform.position.x - transform.position.x) > edgeDistance)
|
|
if (Mathf.Abs(foot.transform.position.x - transform.position.x) > edgeDistance)
|
|
|
{
|
|
{
|
|
@@ -25,7 +25,7 @@ public class Platform : MonoBehaviour
|
|
|
private void OnTriggerExit(Collider other)
|
|
private void OnTriggerExit(Collider other)
|
|
|
{
|
|
{
|
|
|
Foot foot = other.GetComponent<Foot>();
|
|
Foot foot = other.GetComponent<Foot>();
|
|
|
- if(foot != null && foot.gameObject.layer != 8)
|
|
|
|
|
|
|
+ if(foot != null && foot.transform.parent.gameObject.layer != 8)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
if(foot.trigGroundList.Exists(i =>i == gameObject))
|
|
if(foot.trigGroundList.Exists(i =>i == gameObject))
|