示例#1
0
 public static IEnumerator delayJump(SimpleLeg legOne, SimpleLeg legTwo)
 {
     Debug.Log("Delay");
     legOne.lift();
     legTwo.lift();
     while(jumpKeyPressed(false))
     {
         yield return new WaitForFixedUpdate();
     }
     yield return legOne.StartCoroutine(MovementUtility.jump(legOne, legTwo));
 }
示例#2
0
 public static IEnumerator crouch(SimpleLeg legOne, SimpleLeg legTwo)
 {
     legOne.lift();
     legTwo.lift();
     yield return new WaitForFixedUpdate();
 }
示例#3
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;
 }