|
|
@@ -1,13 +1,18 @@
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
+using Sirenix.OdinInspector;
|
|
|
|
|
|
public class Platform : MonoBehaviour
|
|
|
{
|
|
|
- public Rigidbody rb;
|
|
|
- public List<Foot> feet = new List<Foot>();
|
|
|
- public Transform left;
|
|
|
- public Transform right;
|
|
|
+ [FoldoutGroup("组件")] public Rigidbody rb;
|
|
|
+ [FoldoutGroup("组件")] public List<Foot> feet = new List<Foot>();
|
|
|
+ [FoldoutGroup("组件")] public Transform left;
|
|
|
+ [FoldoutGroup("组件")] public Transform right;
|
|
|
+
|
|
|
+ [FoldoutGroup("条件")] [LabelText("是否可以下平台")] public bool canDown = true;
|
|
|
+ [FoldoutGroup("条件")] [LabelText("是否优先行走")] public bool haveMagnetic;
|
|
|
+
|
|
|
public bool TrigFeet
|
|
|
{
|
|
|
get
|
|
|
@@ -15,9 +20,7 @@ public class Platform : MonoBehaviour
|
|
|
return feet.Count > 0;
|
|
|
}
|
|
|
}
|
|
|
- //public float edgeDistance;
|
|
|
-
|
|
|
- public bool canDown = true;
|
|
|
+
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|