예제 #1
0
 public static IEnumerator jump(SimpleLeg legOne, SimpleLeg legTwo)
 {
     Debug.Log("jump");
     legOne.jump();
     legTwo.jump();
     while(!(legOne.isFullyLowered() || legTwo.isFullyLowered())) {
         yield return new WaitForFixedUpdate();
     }
     legOne.relaxThigh();
     legTwo.relaxThigh();
     yield return new WaitForSeconds(0.5f);
 }
예제 #2
0
 public static IEnumerator walkOneLeg(SimpleLeg leg1, SimpleLeg leg2)
 {
     MovementUtility.checkFeet(leg1, leg2);
     leg1.lower();
     leg2.lift();
     while(!leg1.isFullyLowered()) {
         Debug.DrawLine(leg1.thigh.transform.position, leg1.thigh.transform.position, Color.cyan);
         leg1.lower();
         leg2.lift();
         MovementUtility.checkFeet(leg1, leg2);
         yield return new WaitForFixedUpdate();
     }
     yield return null;
 }