|
|
@@ -17,7 +17,7 @@ public class Foot : MonoBehaviour
|
|
|
public List<GameObject> trigGroundList;
|
|
|
public BaGuaTrigger myBaGuaTrigger; //×Ô¼º
|
|
|
public List<BaGuaTrigger> baGuaTrigger = new List<BaGuaTrigger>(); //½ÅÏÂµÄ°ËØÔÅÖ×Ó
|
|
|
- public bool notOnGiant;
|
|
|
+
|
|
|
|
|
|
private void Update()
|
|
|
{
|
|
|
@@ -35,7 +35,7 @@ public class Foot : MonoBehaviour
|
|
|
{
|
|
|
if (haveGravity)
|
|
|
{
|
|
|
- if (rb.velocity.y < 0)
|
|
|
+ if (rb.velocity.y <= 0)
|
|
|
{
|
|
|
foreach (GameObject i in trigGroundList)
|
|
|
{
|
|
|
@@ -49,9 +49,7 @@ public class Foot : MonoBehaviour
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -61,10 +59,7 @@ public class Foot : MonoBehaviour
|
|
|
rb.GetComponent<MoveCharacter>().velocityAddition = platform.rb.velocity.x;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
private void FixedUpdate()
|
|
|
{
|
|
|
@@ -82,14 +77,14 @@ public class Foot : MonoBehaviour
|
|
|
{
|
|
|
if (other.CompareTag("Plane"))
|
|
|
{
|
|
|
- if (notOnGiant)
|
|
|
- {
|
|
|
- Platform platform = other.gameObject.GetComponent<Platform>();
|
|
|
- if (platform)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ //if (notOnGiant)
|
|
|
+ //{
|
|
|
+ // Platform platform = other.gameObject.GetComponent<Platform>();
|
|
|
+ // if (platform)
|
|
|
+ // {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
if (!trigGroundList.Exists(t => t == other.gameObject))
|
|
|
{
|
|
|
trigGroundList.Add(other.gameObject);
|